[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Sleep on Wayland/Sway



I am using the Debian Stable.

I want an advice for configuring lock/sleep on Sway.

I have following settings in my Sway config. And below is my
observation.

--8<---------------cut here---------------start------------->8---
exec swayidle -w \
         timeout 300 'slock' \
		 timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
         before-sleep 'slock'


### System management
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (p) shutdown
mode "$mode_system" {
	 bindsym l exec --no-startup-id slock, mode "default"
     bindsym e exec --no-startup-id swaymsg exit, mode "default"
     bindsym s exec --no-startup-id systemctl suspend, mode "default"
     bindsym h exec --no-startup-id systemctl hibernate, mode "default"
	 bindsym r exec --no-startup-id systemctl reboot, mode "default"
	 bindsym p exec --no-startup-id systemctl poweroff, mode "default"

	 # back to normal: Enter or Escape
	 bindsym Return mode "default"
     bindsym Escape mode "default"
}
bindsym $mod+Pause mode "$mode_system"
--8<---------------cut here---------------end--------------->8---

slock works fine without sleep. But when the system goes to
sleep and wakeup again, the monitor doesn’t come alive.

And because I don’t keep ssh port open and daemon running. I have to
reboot to bring back the monitor.

What are the community suggestions/recommendations on configuring
sleep/lock/screensaver on Sway?


Reply to: