sway: center wallpaper, fix lockscreen flags and add idle timeouts

- Use bg mode 'center' so the wallpaper keeps its native size.
- Drop --clock and --indicator from the lockscreen invocation; those
  flags belong to swaylock-effects and made vanilla swaylock exit with
  an unknown-option error. Keep --indicator-idle-visible to preserve
  the ring while idle.
- Replace the suspend-only swayidle line with a full idle policy:
  5 min lock, 10 min DPMS off, DPMS on on resume, lock before sleep.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Fabio Scotto di Santolo
2026-05-16 22:05:17 +02:00
parent 2ee4bd963e
commit 6884ad709d
2 changed files with 12 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ input * {
seat * xcursor_theme Yaru 24 seat * xcursor_theme Yaru 24
# Outputs # Outputs
output * bg ~/.config/sway/wallpapers/wallpaper-161664.jpg fill output * bg ~/.config/sway/wallpapers/wallpaper-161664.jpg center
# SwayFX effects # SwayFX effects
corner_radius 8 corner_radius 8
@@ -90,8 +90,16 @@ exec udiskie
exec wl-paste --type text --watch cliphist store exec wl-paste --type text --watch cliphist store
exec wl-paste --type image --watch cliphist store exec wl-paste --type image --watch cliphist store
# Lock on suspend # Idle / lock policy
exec swayidle -w before-sleep '~/.config/sway/scripts/lockscreen' # 5 min idle → lock
# 10 min idle → screen off (DPMS)
# resume → screen on
# before sleep → lock
exec swayidle -w \
timeout 300 '~/.config/sway/scripts/lockscreen' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep '~/.config/sway/scripts/lockscreen'
# Terminal # Terminal
bindsym $mod+Return exec alacritty bindsym $mod+Return exec alacritty

View File

@@ -3,8 +3,7 @@
exec swaylock \ exec swaylock \
--image "$HOME/.config/sway/wallpapers/wallpaper-161664.jpg" \ --image "$HOME/.config/sway/wallpapers/wallpaper-161664.jpg" \
--scaling fill \ --scaling fill \
--clock \ --indicator-idle-visible \
--indicator \
--ring-color 2f4058 \ --ring-color 2f4058 \
--inside-color 1f1f28 \ --inside-color 1f1f28 \
--line-color 00000000 \ --line-color 00000000 \