aboutsummaryrefslogtreecommitdiff
path: root/bin/sway-random-bg
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sway-random-bg')
-rwxr-xr-xbin/sway-random-bg7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/sway-random-bg b/bin/sway-random-bg
new file mode 100755
index 0000000..bdcfd67
--- /dev/null
+++ b/bin/sway-random-bg
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+export SWAYSOCK="/run/user/$(id -u)/sway-ipc.$(id -u).$(pgrep -x sway).sock"
+
+WALLPAPER_PATH="$HOME/Pictures/wallpapers"
+
+swaymsg output '*' bg "$(find "$WALLPAPER_PATH" -type f | shuf -n 1)" fill