home/programs/wlogout: add wlogout

This commit is contained in:
Anthony Rodriguez 2024-12-13 23:23:28 +01:00
parent 24dbf5a72f
commit 02ab15aad4
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
2 changed files with 67 additions and 0 deletions

66
home/programs/wlogout.nix Normal file
View file

@ -0,0 +1,66 @@
{
config,
lib,
pkgs,
...
}: {
programs.wlogout = {
enable = true;
layout = let
systemd = let
systemd = lib.getExe' pkgs.systemd;
in {
loginctl = systemd "loginctl";
systemctl = systemd "systemctl";
};
in [
{
action = "${systemd.loginctl} lock-session";
keybind = "l";
label = "lock";
text = "Lock";
}
{
action = "${systemd.systemctl} hibernate";
keybind = "h";
label = "hibernate";
text = "Hibernate";
}
{
action = "${
systemd.loginctl
} terminate-user ${
config.home.username
}";
keybind = "q";
label = "logout";
text = "Logout";
}
{
action = "${systemd.systemctl} poweroff";
keybind = "p";
label = "shutdown";
text = "Shutdown";
}
{
action = "${systemd.systemctl} suspend";
keybind = "s";
label = "suspend";
text = "Suspend";
}
{
action = "${systemd.systemctl} reboot";
keybind = "r";
label = "reboot";
text = "Reboot";
}
];
};
}

View file

@ -39,6 +39,7 @@ in {
"${home}/services/swaync"
"${home}/programs/swaybg.nix"
"${home}/programs/wlogout.nix"
"${home}/services/syncthing.nix"