nix/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout.nix
2023-08-30 23:35:25 +09:00

94 lines
No EOL
3.3 KiB
Nix

{ ... }: {
xdg.configFile."wlogout/layout" = {
enable = true;
target = "./wlogout/layout";
text = ''
{
"label" : "lock",
"action" : "swaylock",
"text" : "Lock",
"keybind" : "l"
}
{
"label" : "hibernate",
"action" : "systemctl hibernate",
"text" : "Hibernate",
"keybind" : "h"
}
{
"label" : "logout",
"action" : "loginctl terminate-user $USER",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}
'';
};
xdg.configFile."wlogout/style.css" = {
enable = true;
target = "./wlogout/style.css";
text = ''
* {
background-image: none;
}
window {
background-color: rgba(50, 48, 47, 0.8);
}
button {
color: #d5c4a1;
background-color: #1E1E1E;
border-style: solid;
border-width: 2px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus, button:active, button:hover {
background-color: #a89984;
outline-style: none;
}
#lock {
background-image: image(url("/nix/store/azgw2sjb3zrzl83qckc2gxbfq5p74j3m-wlogout-1.1.1/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
}
#logout {
background-image: image(url("/nix/store/azgw2sjb3zrzl83qckc2gxbfq5p74j3m-wlogout-1.1.1/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
}
#suspend {
background-image: image(url("/nix/store/azgw2sjb3zrzl83qckc2gxbfq5p74j3m-wlogout-1.1.1/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
}
#hibernate {
background-image: image(url("/nix/store/azgw2sjb3zrzl83qckc2gxbfq5p74j3m-wlogout-1.1.1/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
}
#shutdown {
background-image: image(url("/nix/store/azgw2sjb3zrzl83qckc2gxbfq5p74j3m-wlogout-1.1.1/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
}
#reboot {
background-image: image(url("/nix/store/azgw2sjb3zrzl83qckc2gxbfq5p74j3m-wlogout-1.1.1/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
}
'';
};
}