sway: Lock before sleeping
This commit is contained in:
parent
8b9a61339e
commit
72f04b3307
1 changed files with 18 additions and 13 deletions
|
@ -264,21 +264,26 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
frogeye.desktop.i3.bindmodes = {
|
||||
"[L] Vérouillage [E] Déconnexion [S] Veille [H] Hibernation [R] Redémarrage [P] Extinction" = {
|
||||
bindings = {
|
||||
"l" = "exec --no-startup-id ${pkgs.procps}/bin/pkill -USR1 swayidle, mode default";
|
||||
"e" = "exit, mode default";
|
||||
# TODO Sometimes, exit gets stuck on terminal. Restarting greetd helps.
|
||||
"s" =
|
||||
"exec --no-startup-id ${pkgs.systemd}/bin/systemctl suspend --check-inhibitors=no, mode default";
|
||||
"h" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl hibernate, mode default";
|
||||
"r" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl reboot, mode default";
|
||||
"p" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl poweroff -i, mode default";
|
||||
frogeye.desktop.i3.bindmodes =
|
||||
let
|
||||
lock = "${pkgs.procps}/bin/pkill -USR1 swayidle";
|
||||
in
|
||||
{
|
||||
"[L] Vérouillage [E] Déconnexion [S] Veille [H] Hibernation [R] Redémarrage [P] Extinction" = {
|
||||
bindings = {
|
||||
"l" = "exec --no-startup-id ${lock}, mode default";
|
||||
"e" = "exit, mode default";
|
||||
# TODO Sometimes, exit gets stuck on terminal. Restarting greetd helps.
|
||||
"s" =
|
||||
"exec --no-startup-id ${lock}, exec --no-startup-id ${pkgs.systemd}/bin/systemctl suspend --check-inhibitors=no, mode default";
|
||||
"h" =
|
||||
"exec --no-startup-id ${lock}, exec --no-startup-id ${pkgs.systemd}/bin/systemctl hibernate, mode default";
|
||||
"r" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl reboot, mode default";
|
||||
"p" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl poweroff -i, mode default";
|
||||
};
|
||||
mod_enter = "Escape";
|
||||
};
|
||||
mod_enter = "Escape";
|
||||
};
|
||||
};
|
||||
};
|
||||
options = {
|
||||
frogeye.desktop.i3.bindmodes = lib.mkOption {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue