nix/home-manager/common/desktops/hyprland/stylix/wlogout.nix

85 lines
3.1 KiB
Nix
Raw Normal View History

2024-01-04 06:39:52 +01:00
{ config, ... }: {
2024-01-05 07:28:43 +01:00
services.wlogout = {
2024-01-03 14:25:06 +01:00
enable = true;
2024-01-05 07:28:43 +01:00
layout = [
{
label = "lock";
action = "swaylock";
text = "Lock";
circular = true;
keybind = "l";
}
{
label = "hibernate";
action = "systemctl hibernate";
text = "Hibernate";
circular = true;
keybind = "h";
}
{
label = "logout";
action = "loginctl terminate-user $USER";
text = "Logout";
circular = true;
keybind = "e";
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
circular = true;
keybind = "s";
}
{
label = "suspend";
action = "systemctl suspend";
text = "Suspend";
circular = true;
keybind = "u";
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
circular = true;
keybind = "r";
}
];
};
xdg.configFile."wlogout/style.css" = {
enable = false;
2024-01-03 14:25:06 +01:00
target = "./wlogout/style.css";
text = ''
* {
background-image: none;
}
window {
2024-01-05 03:12:52 +01:00
background-color: #${config.lib.stylix.colors.base00};
2024-01-03 14:25:06 +01:00
}
button {
2024-01-04 14:40:07 +01:00
color: #${config.lib.stylix.colors.base04};
2024-01-03 14:25:06 +01:00
font-size: 0px;
border-radius: 5000px;
margin: 25px;
2024-01-05 04:35:26 +01:00
background-color: #${config.lib.stylix.colors.base02};
2024-01-03 14:25:06 +01:00
border-style: solid;
border-width: 3px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:active, button:hover {
2024-01-05 03:43:08 +01:00
background-color: #${config.lib.stylix.colors.base08};
2024-01-03 14:25:06 +01:00
outline-style: none;
}
#lock { background-image: url("/etc/nixos/git/home-manager/common/desktops/hyprland/common/wlogout/lock.png"); }
#logout { background-image: url("/etc/nixos/git/home-manager/common/desktops/hyprland/common/wlogout/logout.png"); }
#suspend { background-image: url("/etc/nixos/git/home-manager/common/desktops/hyprland/common/wlogout/suspend.png"); }
#hibernate { background-image: url("/etc/nixos/git/home-manager/common/desktops/hyprland/common/wlogout/hibernate.png"); }
#shutdown { background-image: url("/etc/nixos/git/home-manager/common/desktops/hyprland/common/wlogout/shutdown.png"); }
#reboot { background-image: url("/etc/nixos/git/home-manager/common/desktops/hyprland/common/wlogout/reboot.png"); }
'';
};
}