I've got a big TV screen that I like to hook up to my computer on certain occasions; however, my idea could also be applied to holding presentations with an external screen. I'd like to show a special wallpaper on the new screen, which should come up automatically after changing the screen layout with the arandr-generated command.
I've managed to get this to work temporarily by relying on Nitrogen restoring the last layout, however, this is quite unreliable. The two screens I always have connected are, in the default layout, recognized as Screen 1 and Screen 2. When switching to the TV-Layout, Screen 2 suddenly becomes Screen 3, with the TV taking its place as Screen 2.
This must confuse Nitrogen, because when switching to the TV-Layout, the TV screen (Screen 2 after the switch) "duplicates" the wallpaper from my regular screen (Formerly Screen 2, afterwards Screen 3). On the other hand, switching back to the Default layout after having set the Wallpapers as I'd like them, my default Screen 2 takes the wallpaper of the TV screen.
Given the above, I'm not sure I can find a way to rely on Nitrogen restoring the wallpapers automatically. As a workaround, I'd like to put commands that correctly set up the wallpapers into both of my arandr-generated screenlayout scripts. However, command-line options for Nitrogen only seem to help start the GUI, and I couldn't find out which backend is used to set the wallpapers.
What options do I have here?