Files
nixos/Droidnix/assets/traveldroid/Wallpapers/scripts/set-workspace-wallpaper.sh
T
2026-04-08 19:25:25 +02:00

20 lines
452 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 with smooth transition
awww img "$wall" \
--transition-type wipe \
--transition-duration 0.5 \
--transition-fps 60
fi