You are not logged in.
I'm currently running the "awesomedm" desktop manager through xorg. I'm working on making scripts to change my wallpaper, and want to select a random wallpaper from a folder for each monitor.
Currently, I use nitrogen to set wallpapers, and while it works there doesn't seem to be a way to change wallpapers outside of the GUI, while I want to make scripts to change the theme of my setup through the command line without clicking through a GUI each time.
I've also tinkered a bit with feh and it seems to be a better option, as it works through the command line and has a built in randomization feature that selects a random wallpaper for each monitor from a directory.
My main problem stems from the fact that one of my monitors is vertical, and obviously I don't want to use a horizontal wallpaper for this monitor, I want some way to randomly select a wallpaper for my 2 horizontal monitors from a directory of horizontal wallpapers, and then randomly select a wallpaper for my vertical monitor from a directory of vertical wallpapers, and unfortunately feh doesn't seem to have this option, as its --randomize feature seems to set all wallpapers at once
How can I make a script that will randomly select a wallpaper from a directory of horizontal wallpapers and set my horizontal monitor to it, and then randomly select a wallpaper from a directory of vertical wallpapers and set my vertical monitor to it?
edit note: had to shorten title and cut off "based on monitor?" to fit [solved] in title
Last edited by nnnyt2 (2021-11-18 19:40:54)
Offline
Note that all options except --bg-tile support Xinerama. For instance, if you have multiple monitors connected and use e.g. --bg-center, feh will center or appropriately offset the image on each monitor. You may even specify more than one file, in that case, the first file is set on monitor 0, the second on monitor 1, and so on. Use xrandr --listmonitor to determine how Xinerama monitor IDs map to screens / monitors in your setup.
feh --bg-scale $(shuf -en1 /path/to/portrait/*)" "$(shuf -en1 /path/to/landscape/*)"Last edited by Trilby (2021-11-18 18:20:33)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
That worked great, thank you!
Offline
This does not work for me. The order is completely random.
Offline
The order is completely random.
Yeah, that's the point. If you want something different, you'll need a different command.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline