Sway : Refactor session.

This commit is contained in:
Dmitry Voronin 2024-04-27 00:45:07 +03:00
parent 0afe200668
commit 420b46e6f0
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -1,6 +1,8 @@
{ key, style, ... }: {
{ key, style, ... }: let
lock = "swaylock -f -F -c 000000 -k --font \"${style.font.serif.name}\" --font-size ${toString(style.font.size.desktop)}";
in {
text = ''
bindsym $mod+${key.action.wait} exec '_twice 1 swaylock -f -F -c 000000 -k --font "${style.font.serif.name}" --font-size ${toString(style.font.size.desktop)}'
bindsym $mod+Shift+${key.action.exit} exec _twice 1 bash -c 'swaylock -f -F -c 000000 -k --font "${style.font.serif.name}" --font-size ${toString(style.font.size.desktop)}; systemctl suspend -i'
bindsym $mod+${key.action.wait} exec '_twice 1 ${lock}'
bindsym $mod+Shift+${key.action.exit} exec _twice 1 bash -c '${lock}; systemctl suspend -i'
'';
}