This repository has been archived on 2024-07-03. You can view files and clone it, but cannot push or open issues or pull requests.
home-manager/programs/desktop/wlogout/default.nix
Evie Litherland-Smith e9a3bcd858 Update accent colour definitions
Rename variables to be clear these are colour names, not the actual
colours. Redefine as baseXX to be used in all scheme variables.

Update all uses to remove "with scheme" form and make more explicit.
2024-06-16 11:28:05 +01:00

78 lines
1.5 KiB
Nix

{
config,
fonts,
...
}: {
programs.wlogout = {
enable = true;
layout = [
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "logout";
action = "swaymsg exit";
text = "Logout";
keybind = "l";
}
];
style = let
sc = config.scheme.withHashtag;
shutdownIcon = ./icons/shutdown.png;
rebootIcon = ./icons/reboot.png;
logoutIcon = ./icons/logout.png;
in ''
* {
font-size: ${toString fonts.sizes.popups}px;
font-family: "${fonts.sansSerif.name}";
}
window {
border: none;
background-color: transparent;
}
button {
background-color: ${sc.base00};
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
box-shadow: none;
margin: 5px;
color: ${sc.base05};
}
button:hover {
background-color: ${sc.base01};
color: ${sc.base05};
}
button:focus {
background-color: ${sc.base02};
color: ${sc.base05};
}
#shutdown {
background-image: url("${shutdownIcon}");
}
#reboot {
background-image: url("${rebootIcon}");
}
#logout {
background-image: url("${logoutIcon}");
}
'';
};
}