-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(home-manager): init wlogout module
- Loading branch information
1 parent
becc648
commit 11f3880
Showing
4 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
./tofi.nix | ||
./obs-studio.nix | ||
./waybar.nix | ||
./wlogout.nix | ||
./yazi.nix | ||
./zathura.nix | ||
./zellij.nix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ config, lib, ... }: | ||
let | ||
inherit (config.catppuccin) sources; | ||
inherit (lib) ctp; | ||
cfg = config.programs.wlogout.catppuccin; | ||
enable = cfg.enable && config.programs.wlogout.enable; | ||
in | ||
{ | ||
options.programs.wlogout.catppuccin = ctp.mkCatppuccinOpt { name = "wlogout"; } // { | ||
accent = ctp.mkAccentOpt "wlogout"; | ||
iconStyle = lib.mkOption { | ||
type = lib.types.enum [ | ||
"wlogout" | ||
"wleave" | ||
]; | ||
description = "Icon style to set in ~/.config/wlogout/style.css"; | ||
default = "wlogout"; | ||
example = lib.literalExpression "wleave"; | ||
}; | ||
extraStyle = lib.mkOption { | ||
type = lib.types.lines; | ||
description = "Additional CSS to put in ~/.config/wlogout/style.css"; | ||
default = ""; | ||
example = lib.literalExpression '' | ||
button { | ||
border-radius: 2px; | ||
} | ||
#lock { | ||
background-image: url("${config.gtk.iconTheme.package}/share/icons/${config.gtk.iconTheme.name}/apps/scalable/system-lock-screen.svg"); | ||
} | ||
''; | ||
}; | ||
}; | ||
|
||
config.programs.wlogout = lib.mkIf enable { | ||
style = lib.concatStrings [ | ||
'' | ||
@import url("${sources.wlogout + /themes/${cfg.flavor}/${cfg.accent}.css}"); | ||
'' | ||
# Set icons | ||
(lib.concatMapStrings | ||
(icon: '' | ||
#${icon} { | ||
background-image: url("${sources.wlogout}/icons/${cfg.iconStyle}/${cfg.flavor}/${cfg.accent}/${icon}.svg"); | ||
} | ||
'') | ||
[ | ||
"hibernate" | ||
"lock" | ||
"logout" | ||
"reboot" | ||
"shutdown" | ||
"suspend" | ||
] | ||
) | ||
cfg.extraStyle | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters