nixcfg/homeManagerModules/apps/wlogout/default.nix

92 lines
2.7 KiB
Nix
Raw Normal View History

2024-04-07 22:16:33 -04:00
{
config,
lib,
pkgs,
2024-04-07 22:16:33 -04:00
...
}: let
cfg = config.ar.home;
in {
config = lib.mkIf cfg.apps.wlogout.enable {
2024-03-29 23:27:08 -04:00
programs.wlogout = {
enable = true;
2024-03-29 23:27:08 -04:00
layout = [
{
label = "logout";
action = ''${lib.getExe' pkgs.systemd "loginctl"} terminate-user ${config.home.username}'';
2024-05-11 17:45:01 -04:00
text = "logout (e)";
2024-03-29 23:27:08 -04:00
keybind = "e";
}
{
label = "shutdown";
action = ''${lib.getExe' pkgs.systemd "systemctl"} poweroff'';
2024-05-11 17:45:01 -04:00
text = "shutdown (s)";
2024-03-29 23:27:08 -04:00
keybind = "s";
}
{
label = "reboot";
action = ''${lib.getExe' pkgs.systemd "systemctl"} reboot'';
2024-05-11 17:45:01 -04:00
text = "reboot (r)";
2024-03-29 23:27:08 -04:00
keybind = "r";
}
];
2024-05-11 17:45:01 -04:00
style = ''
* {
background-image: none;
box-shadow: none;
font-family: "${cfg.theme.sansFont.name}", sans-serif;
2024-05-11 17:45:01 -04:00
transition: 20ms;
}
window {
2024-08-08 19:33:07 -04:00
background-color: rgba(35, 38, 52, 0.6);
2024-05-11 17:45:01 -04:00
}
button {
background-color: ${cfg.theme.colors.background};
background-position: center;
background-repeat: no-repeat;
background-size: 25%;
border-color: ${cfg.theme.colors.primary};
2024-05-11 17:45:01 -04:00
border-radius: 10;
border-style: solid;
border-width: 2;
color: ${cfg.theme.colors.text};
margin: 5px;
text-decoration-color: ${cfg.theme.colors.text};
2024-05-11 17:45:01 -04:00
}
button:active, button:hover {
background-color: ${cfg.theme.colors.primary};
outline-style: none;
2024-05-11 17:45:01 -04:00
}
#lock {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
}
#logout {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
}
#suspend {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
}
#hibernate {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
}
#shutdown {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
}
#reboot {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
}
'';
2024-03-29 23:27:08 -04:00
};
};
}