diff options
| author | silly <u65487754@gmail.com> | 2026-03-16 10:20:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-16 10:20:54 +0100 |
| commit | 817cafca4908b16f0dcfd47ae3c2c70cdaeb7553 (patch) | |
| tree | 85993c9e91014c6497ee7560c96d269dcfd75794 | |
| parent | 5fd38840b973a24628b52062a8591d6e2eec4199 (diff) | |
Update wallpaper.sh
| -rw-r--r-- | .config/scripts/wallpaper.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.config/scripts/wallpaper.sh b/.config/scripts/wallpaper.sh index c63e9ee..f20edc9 100644 --- a/.config/scripts/wallpaper.sh +++ b/.config/scripts/wallpaper.sh @@ -7,7 +7,6 @@ RASI_THEME="$HOME/.config/rofi/wallpaper.rasi" MAIN_MONITOR="HDMI-A-1" SECOND_MONITOR="DP-1" -mkdir -p "$THUMBNAIL_DIR" list_images() { DICE_ICON="$HOME/.config/rofi/dice.png" echo -en "random\0icon\x1f$DICE_ICON\n" @@ -31,7 +30,7 @@ selected=$(list_images | rofi -dmenu -i -p ">" -theme "$RASI_THEME") if [[ "$selected" == "random" ]]; then current_wall=$(basename "$(readlink -f "$CACHE_PATH")" 2>/dev/null) - selected=$(ls "$WALLPAPER_DIR" | grep -v "$current_wall" | shuf -n 1) + selected=$(ls -p "$WALLPAPER_DIR" | grep -v / | grep -v "^$current_wall$" | shuf -n 1) fi FULL_PATH="$WALLPAPER_DIR/$selected" @@ -40,6 +39,7 @@ swww img -o "$MAIN_MONITOR" "$FULL_PATH" --transition-type grow --transition-dur swww clear --outputs "$SECOND_MONITOR" wal -i "$FULL_PATH" -n -q +mkdir -p "$(dirname "$CACHE_PATH")" ln -sf "$FULL_PATH" "$CACHE_PATH" kill -SIGUSR1 $(pgrep kitty) 2>/dev/null |
