diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2023-01-14 14:47:33 +0100 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2023-01-14 14:47:33 +0100 |
commit | 23e2bfd987c430bb41bc7860c46c2f572e9e2db4 (patch) | |
tree | a9a477e11fb6dbea189835147a149e56c0f03a7f /.bin/x11-config | |
parent | ce6be946d024aa55a15d576388d05f90be671cf2 (diff) | |
download | dots-23e2bfd987c430bb41bc7860c46c2f572e9e2db4.tar.gz |
Sat Jan 14 02:47:33 PM CET 2023
Diffstat (limited to '.bin/x11-config')
-rwxr-xr-x | .bin/x11-config | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/.bin/x11-config b/.bin/x11-config index efd47d7..554f00c 100755 --- a/.bin/x11-config +++ b/.bin/x11-config @@ -25,7 +25,7 @@ xset s off xset s noblank xset -dpms -if [ $(uname -s) = "OpenBSD" ]; then +if [ "$(uname -s)" = "OpenBSD" ]; then xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 @@ -35,6 +35,15 @@ fi xsetroot -mod 2 2 -fg white -bg black xsetroot -grey -if [ -f "${wallpaper_file}" ]; then - feh --bg-scale "${wallpaper_file}" +monitors="$(xrandr --listactivemonitors | tail -n +2)" +feh_args="" +for i in seq $(echo monitors | wc -l); do + wallpaper=$(find .local/share/dot -iname "wallpaper*" | shuf -n 1) + if [ "${wallaper}" ]; then + feh_args="${feh_args} --bg-fill ${wallpaper} " + fi +done + +if [ "${feh_args}" ]; then + feh ${feh_args} fi |