19 lines
433 B
Bash
Executable File
19 lines
433 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Get active workspace ID
|
|
ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
|
|
|
# Format number with leading zero (01, 02, ...)
|
|
num=$(printf "%02d" "$ws")
|
|
|
|
# Build wallpaper path
|
|
wall="$HOME/Wallpapers/pictures/${num}.jpg"
|
|
|
|
# Check if file exists
|
|
if [ -f "$wall" ]; then
|
|
# Set wallpaper (hyprpaper)
|
|
hyprctl hyprpaper unload all
|
|
hyprctl hyprpaper preload "$wall"
|
|
hyprctl hyprpaper wallpaper ",$wall"
|
|
fi
|