update command to use tr

This commit is contained in:
2025-05-01 21:17:54 -07:00
parent 6640664a69
commit 04a1729781

View File

@@ -16,7 +16,7 @@ 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//\/\///}"
WALLPAPER=$(printf "%s" "$WALLPAPER" | tr -s '/')
echo "Changing wallpaper to $WALLPAPER"
echo "$WALLPAPER" > "$HOME/.wallpaper"