-
Notifications
You must be signed in to change notification settings - Fork 58
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): add support for kvantum
- Loading branch information
1 parent
ac87622
commit 3522223
Showing
2 changed files
with
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
let | ||
cfg = config.qt.style.catppuccin; | ||
enable = | ||
cfg.enable | ||
&& config.qt.enable | ||
&& lib.elem config.qt.style.name [ | ||
"kvantum" | ||
"Kvantum" | ||
]; | ||
flavourCapitalized = lib.ctp.mkUpper cfg.flavour; | ||
accentCapitalized = lib.ctp.mkUpper cfg.accent; | ||
theme = pkgs.catppuccin-kvantum.override { | ||
accent = accentCapitalized; | ||
variant = flavourCapitalized; | ||
}; | ||
in | ||
{ | ||
options.qt.style.catppuccin = lib.ctp.mkCatppuccinOpt "Kvantum" // { | ||
accent = lib.ctp.mkAccentOpt "Kvantum"; | ||
|
||
apply = lib.mkOption { | ||
type = lib.types.bool; | ||
default = true; | ||
description = '' | ||
Applies the theme by overwriting `$XDG_CONFIG_HOME/Kvantum/kvantum.kvconfig`. | ||
If this is disabled, you must manually set the theme (e.g. by using `kvantummanager`). | ||
''; | ||
}; | ||
}; | ||
|
||
config.xdg.configFile = lib.mkIf enable { | ||
"Kvantum/Catppuccin-${flavourCapitalized}-${accentCapitalized}".source = "${theme}/share/Kvantum/Catppuccin-${flavourCapitalized}-${accentCapitalized}"; | ||
"Kvantum/kvantum.kvconfig" = lib.mkIf cfg.apply { | ||
text = '' | ||
[General] | ||
theme=Catppuccin-${flavourCapitalized}-${accentCapitalized} | ||
''; | ||
}; | ||
}; | ||
} |
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