add swww wallpaper cycling on unlock

This commit is contained in:
2026-06-13 11:18:56 +02:00
parent 4b7761924a
commit f6ba060b2f
3 changed files with 12 additions and 3 deletions
+4 -3
View File
@@ -17,7 +17,8 @@ exec "foot --server"
exec lxqt-policykit-agent
exec mako
output * bg ~/.config/sway/nixgirl.png fill
exec swww-daemon
exec sh -c 'sleep 1 && ~/.config/sway/wallpaper.sh'
input type:keyboard {
xkb_layout "se"
@@ -100,7 +101,7 @@ bindsym $mod+Shift+s exec 'grim -l 0 -g "$(slurp)" - | wl-copy'
bindsym $mod+Alt+s exec 'mkdir -p ~/Pictures/Screenshots && grim -l 0 -g "$(slurp)" - | satty --filename - --output-filename ~/Pictures/Screenshots/$(date +"%Y-%m-%d_%H-%M-%S").png'
exec swayidle -w \
timeout 300 'swaylock -f -c 0a0a0a' \
timeout 300 'swaylock -f -c 0a0a0a && ~/.config/sway/wallpaper.sh' \
timeout 600 'swaymsg "output * dpms off"; wpctl set-mute @DEFAULT_AUDIO_SINK@ 1' \
resume 'swaymsg "output * dpms on"; wpctl set-mute @DEFAULT_AUDIO_SINK@ 0' \
before-sleep 'swaylock -f -c 0a0a0a'
before-sleep 'swaylock -f -c 0a0a0a && ~/.config/sway/wallpaper.sh'
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
WALLPAPER=$(find "$HOME/.config/sway/wallpapers" -maxdepth 1 -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" \) | shuf -n 1)
swww img "$WALLPAPER" --transition-type random --transition-duration 2 --transition-fps 60