summaryrefslogtreecommitdiffstats
path: root/.bin/x11-config
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2023-01-14 14:47:33 +0100
committerRomain Gonçalves <me@rgoncalves.se>2023-01-14 14:47:33 +0100
commit23e2bfd987c430bb41bc7860c46c2f572e9e2db4 (patch)
treea9a477e11fb6dbea189835147a149e56c0f03a7f /.bin/x11-config
parentce6be946d024aa55a15d576388d05f90be671cf2 (diff)
downloaddots-23e2bfd987c430bb41bc7860c46c2f572e9e2db4.tar.gz
Sat Jan 14 02:47:33 PM CET 2023
Diffstat (limited to '.bin/x11-config')
-rwxr-xr-x.bin/x11-config15
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
remember that computers suck.