nixcfg/homeManagerModules/apps/wlogout/default.nix
Aly Raffauf 23c783cfc5
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
theme: add font options (#76)
* swaylock: update to standard font name

* theme: setup font options and mgirate theme.nix

* zed: migrate to font modules

* swaylock: migrate to font modules

* kitty: migrate to font modules

* fuzzel: migrate to font modules

* vsCodium: migrate to font modules

* rofi: migrate to font modules

* rofi: migrate to font modules

* waybar: migrate to font modules

* alacritty: migrate to font modules

* alacritty: pull font size from theme module

* nixfmt

* rustboro: migrate font overrides

* waybar: calculate font size from theme font settings

* vsCodium: set font size from module

* zed: set font size from module

* sway: migrate to font modules

* wlogout: migrate to font modules

* mako: migrate to font modules

* sway: fix improper option reference
2024-08-07 23:09:31 -04:00

92 lines
2.7 KiB
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.ar.home;
in {
config = lib.mkIf cfg.apps.wlogout.enable {
programs.wlogout = {
enable = true;
layout = [
{
label = "logout";
action = ''${lib.getExe' pkgs.systemd "loginctl"} terminate-user ${config.home.username}'';
text = "logout (e)";
keybind = "e";
}
{
label = "shutdown";
action = ''${lib.getExe' pkgs.systemd "systemctl"} poweroff'';
text = "shutdown (s)";
keybind = "s";
}
{
label = "reboot";
action = ''${lib.getExe' pkgs.systemd "systemctl"} reboot'';
text = "reboot (r)";
keybind = "r";
}
];
style = ''
* {
background-image: none;
box-shadow: none;
font-family: "${cfg.theme.sansFont.name}", sans-serif;
transition: 20ms;
}
window {
background-color: rgba(35, 38, 52, 0.8);
}
button {
background-color: ${cfg.theme.colors.background};
background-position: center;
background-repeat: no-repeat;
background-size: 25%;
border-color: ${cfg.theme.colors.primary};
border-radius: 10;
border-style: solid;
border-width: 2;
color: ${cfg.theme.colors.text};
margin: 5px;
text-decoration-color: ${cfg.theme.colors.text};
}
button:active, button:hover {
background-color: ${cfg.theme.colors.primary};
outline-style: none;
}
#lock {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
}
#logout {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
}
#suspend {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
}
#hibernate {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
}
#shutdown {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
}
#reboot {
background-image: image(url("${config.programs.wlogout.package}/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
}
'';
};
};
}