nixos/home/hyprland/wlogout/default.nix

71 lines
1.4 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
{
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 = "hyprctl dispatch exit";
text = "Logout";
keybind = "l";
}
];
style = let
shutdownIcon = ./icons/shutdown.png;
rebootIcon = ./icons/reboot.png;
logoutIcon = ./icons/logout.png;
in ''
window {
background: transparent;
}
button {
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
border: none;
background-color: rgba(36, 39, 58, .5);
box-shadow: none;
margin: 5px;
font-size: 20px;
color: #6e738d;
}
button:hover {
background-color: rgba(183, 189, 248, .05);
color: #cad3f5;
}
button:focus {
background-color: rgba(202, 211, 245, .1);
color: #cad3f5;
}
#shutdown {
background-image: url("${shutdownIcon}");
}
#reboot {
background-image: url("${rebootIcon}");
}
#logout {
background-image: url("${logoutIcon}");
}
'';
};
}