diff options
| author | silly <u65487754@gmail.com> | 2026-03-09 01:43:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-09 01:43:38 +0100 |
| commit | 54f60717a3db62ef35d37ee807220eb4b0ffd359 (patch) | |
| tree | 8e0b5ecc3c5c204ac23ca49ff5533e3a71a6260d /.config | |
| parent | eb7daa131ab9cf7dac8d8ec372034a7decca5ff5 (diff) | |
Update wallpaper.sh
Diffstat (limited to '.config')
| -rw-r--r-- | .config/scripts/wallpaper.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.config/scripts/wallpaper.sh b/.config/scripts/wallpaper.sh index c754cc0..e5d389a 100644 --- a/.config/scripts/wallpaper.sh +++ b/.config/scripts/wallpaper.sh @@ -2,15 +2,21 @@ WALL_DIR="$HOME/.config/wallpaper" -selected=$(ls "$WALL_DIR" | fuzzel -d -p "> ") +selected=$(echo -e "random\n$(ls "$WALL_DIR")" | fuzzel -d -p "> ") + [[ -z "$selected" ]] && exit + +if [ "$selected" = "random" ]; then + selected=$(ls "$WALL_DIR" | shuf -n 1) +fi + FULL_PATH="$WALL_DIR/$selected" swww img "$FULL_PATH" --transition-type grow --transition-duration 1.5 --transition-fps 120 wal -i "$FULL_PATH" -n -q -kill -SIGUSR1 $(pgrep kitty) +kill -SIGUSR1 $(pgrep kitty) 2>/dev/null killall dunst dunst & |
