diff --git a/module/sway/module/Session.nix b/module/sway/module/Session.nix index 55bd29a..9abb499 100644 --- a/module/sway/module/Session.nix +++ b/module/sway/module/Session.nix @@ -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' ''; }