I have a script that I run to swap my xorg.conf from a 2-screen version to a 3-screen version. I'd like to export to an enviornment variable: NUMBER_OF_SCREENS.
Later, when I log-in, I run a script which randomly selects 2 images, resizes them, splices them togeather, and sets the wallpaper. I'd like to use NUMBER_OF_SCREENS to decide wether to splice a 3rd image in there.
PS. My second script is in Python, so if you know of a way to query the number of screens and the resolution of each screen, I'd be SOOOO happy.