nixos/system/home/wlogout.nix

87 lines
2.2 KiB
Nix
Raw Permalink Normal View History

{ config, ... }:
{
programs.wlogout = {
enable = true;
layout = [
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "lock";
action = "${config.programs.hyprlock.package}/bin/hyprlock";
text = "Lock Screen";
keybind = "l";
}
];
style =
let
scheme = config.lib.stylix.scheme;
opacity = config.stylix.opacity.popups;
icons = "${config.programs.wlogout.package}/share/wlogout/icons";
in
''
* {
background-image: none;
box-shadow: none;
}
window {
background-color: rgba(${scheme.base00-rgb-r}, ${scheme.base00-rgb-g}, ${scheme.base00-rgb-b}, ${toString opacity});
}
button {
border-radius: 0;
border-color: ${scheme.withHashtag.base03};
text-decoration-color: ${scheme.withHashtag.base05};
color: ${scheme.withHashtag.base05};
background-color: ${scheme.withHashtag.base00};
border-style: solid;
border-width: 1px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus, button:active, button:hover {
text-decoration-color: ${scheme.withHashtag.base00};
color: ${scheme.withHashtag.base00};
background-color: ${scheme.withHashtag.base0E};
outline-style: none;
}
#lock {
background-image: image(url("${icons}/lock.png"));
}
#logout {
background-image: image(url("${icons}/logout.png"));
}
#suspend {
background-image: image(url("${icons}/suspend.png"));
}
#hibernate {
background-image: image(url("${icons}/hibernate.png"));
}
#shutdown {
background-image: image(url("${icons}/shutdown.png"));
}
#reboot {
background-image: image(url("${icons}/reboot.png"));
}
'';
};
}