loserMcloser / waylogout

MIT License
35 stars 2 forks source link

How to invoke swaylock before suspend or hybernate? #4

Closed frere-jacques closed 1 year ago

frere-jacques commented 1 year ago

I managed to configure waylogout to my liking. Only problem is if I go to eg suspend I don't see a wayto get swaylock beforehand. In my sway config it is working with swayidle by adding before-sleep like thist:

exec swayidle -w \
    timeout 300 'swaylock' \
    timeout 600 'swaymsg "output * dpms off"' \
        resume 'swaymsg "output * dpms on"' \
    timeout 900 'systemctl suspend' \
    before-sleep 'swaylock'

But I didn't found anything like that for waylogout.

frere-jacques commented 1 year ago

Actually it worked now ootb by just executing systemctl suspend on hybernate.