fix wallpaper script

This commit is contained in:
sudacode 2025-03-16 02:34:55 -07:00
parent db2dacd9d8
commit 2dffccd7a3
Signed by: sudacode
SSH Key Fingerprint: SHA256:lT5C2bB398DcX6daCF/gYFNSTK3y+Du3oTGUnYzfTEw

View File

@ -15,6 +15,8 @@ CURRENT_WALL=$(hyprctl hyprpaper listloaded)
# Get a random wallpaper that is not the current one
WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" ! -name "*.json" | shuf -n 1)
# remove double slashes that's there for some reason
WALLPAPER="${WALLPAPER//\/\///}"
echo "Changing wallpaper to $WALLPAPER"
echo "$WALLPAPER" > "$HOME/.wallpaper"