diff options
author | Guangxiong Lin <[email protected]> | 2024-01-24 23:54:35 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2024-01-24 23:54:35 +0800 |
commit | c7ebc26a9070f7593622748c023d0a78761045c6 (patch) | |
tree | 21f12ba6b81240c95cc5f180bcf93f098d44e927 /bin/sway-random-bg | |
parent | dcc82e4f2daa496358d2c9f378c7c873ba7d106c (diff) | |
download | dotfiles-c7ebc26a9070f7593622748c023d0a78761045c6.tar.gz dotfiles-c7ebc26a9070f7593622748c023d0a78761045c6.tar.bz2 dotfiles-c7ebc26a9070f7593622748c023d0a78761045c6.zip |
Add script to help update wallpapers
Diffstat (limited to 'bin/sway-random-bg')
-rwxr-xr-x | bin/sway-random-bg | 7 |
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 |