From 23e2bfd987c430bb41bc7860c46c2f572e9e2db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 14 Jan 2023 14:47:33 +0100 Subject: Sat Jan 14 02:47:33 PM CET 2023 --- .bin/x11-config | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to '.bin/x11-config') 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 -- cgit v1.2.3