From e9a52bfa019131bc1cc3d249f217ea97ec616d81 Mon Sep 17 00:00:00 2001 From: reidlab Date: Fri, 27 Dec 2024 01:46:05 -0800 Subject: [PATCH] better theme polarity methods --- modules/desktop/themes/catppuccin/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/desktop/themes/catppuccin/default.nix b/modules/desktop/themes/catppuccin/default.nix index 1c10baf..bfc7261 100644 --- a/modules/desktop/themes/catppuccin/default.nix +++ b/modules/desktop/themes/catppuccin/default.nix @@ -5,6 +5,8 @@ let cfg = config.modules.desktop.themes; accent = "pink"; variant = "mocha"; + + dark = variant != "latte"; colorScheme = inputs.nix-colors.colorSchemes.${"catppuccin-${variant}"}; pascalCase = s: (toUpper (substring 0 1 s)) + (toLower (substring 1 (stringLength s) s)); in { @@ -12,7 +14,7 @@ in { colorScheme = colorScheme; modules.desktop.themes = { - dark = variant != "latte"; + dark = dark; gtkTheme = { name = "catppuccin-${variant}-${accent}-compact+rimless"; @@ -33,12 +35,12 @@ in { }; iconTheme = { - name = "WhiteSur-dark"; + name = "WhiteSur-${if dark then "dark" else "light"}"; package = pkgs.whitesur-icon-theme; }; cursorTheme = { - name = "graphite-dark"; + name = "graphite-${if dark then "dark" else "light"}"; package = pkgs.graphite-cursors; size = 24; };