swaywm / swaylock

Screen locker for Wayland
MIT License
851 stars 202 forks source link

[Feature request] add keybindings to swaylock #293

Closed nakibrayan3 closed 1 year ago

nakibrayan3 commented 1 year ago

when i close my laptop lid it activates swaylock before sleep

and when i am watching a video and i close my laptop lid that video is paused

but when i open my laptop lid it start playing the video immediately

i want to have a keybinding to pause any media playing before i continue typing my password

Example: bind XF86AudioPlay exec playerctl play-pause

kennylevinsen commented 1 year ago

Just use bindsym --locked in sway to allow the keybinding to work while a lock screen is active. No need for swaylock to have its own keybindings.

Alternatively, if you always want things to pause when your lock screen comes up, call pause (not play-pause) before the swaylock command.