78 lines
1.6 KiB
Nix

{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.wlogout;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.wlogout =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable wlogout.";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ wlogout ];
xdg.configFile."wlogout/style.css".text = ''
* {
all: unset;
font-family: JetBrains Mono Nerd Font;
}
window {
background-color: #${palette.base00};
}
button {
color: #${palette.base01};
font-size: 64px;
background-color: rgba(0,0,0,0);
outline-style: none;
margin: 5px;
}
button:focus, button:active, button:hover {
color: #${palette.base0D};
transition: ease 0.4s;
}
'';
xdg.configFile."wlogout/layout".text = ''
{
"label" : "lock",
"action" : "gtklock",
"text" : "󰌾",
"keybind" : ""
}
{
"label" : "logout",
"action" : "loginctl terminate-user $USER",
"text" : "󰗽",
"keybind" : ""
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "󰐥",
"keybind" : ""
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "󰑓",
"keybind" : ""
}
'';
};
}