config/homes/desktop/wlogout.nix

94 lines
2.5 KiB
Nix
Raw Normal View History

2024-09-15 12:56:25 +01:00
{ pkgs, ... }:
{
programs.wlogout = {
enable = true;
layout = [
{
"label" = "lock";
"action" = "loginctl lock-session";
"text" = "Lock";
"keybind" = "l";
}
{
"label" = "shutdown";
"action" = "systemctl poweroff";
"text" = "Shutdown";
"keybind" = "s";
}
{
"label" = "logout";
"action" = "loginctl terminate-user $USER";
"text" = "Logout";
"keybind" = "e";
}
{
"label" = "hibernate";
"action" = "systemctl hibernate";
"text" = "Hibernate";
"keybind" = "h";
}
{
"label" = "suspend";
"action" = "systemctl suspend";
"text" = "Suspend";
"keybind" = "u";
}
{
"label" = "reboot";
"action" = "systemctl reboot";
"text" = "Reboot";
"keybind" = "r";
}
];
style = ''
* {
background-image: none;
}
window {
background-color: rgba(30, 33, 39, 0.8);
}
button {
background-color: #1e2127;
border-style: solid;
border-width: 0px;
border-radius: 0;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
color: #abb2bf;
}
button:focus, button:active, button:hover {
background-color: #abb2bf;
color: #1e2127;
outline-style: none;
}
#lock {
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/lock.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/lock.png"));
}
#logout {
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/logout.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/logout.png"));
}
#suspend {
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/suspend.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/suspend.png"));
}
#hibernate {
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/hibernate.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/hibernate.png"));
}
#shutdown {
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/shutdown.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/shutdown.png"));
}
#reboot {
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/reboot.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/reboot.png"));
}
'';
};
}