diff --git a/home/all.nix b/home/all.nix index f58f656..9151588 100755 --- a/home/all.nix +++ b/home/all.nix @@ -98,6 +98,11 @@ default = "${pkgs.catppuccin-cursors.${attrName}}/share/icons"; }; }; + isDark = lib.mkOption { + type = lib.types.bool; + readOnly = true; + default = config.catppuccin.flavor != "latte"; + }; }; }; @@ -201,7 +206,7 @@ enable = true; iconTheme = { - name = "Colloid-Dark"; + name = if config.userOptions.isDark then "Colloid-Dark" else "Colloid-Light"; package = pkgs.colloid-icon-theme; }; @@ -226,25 +231,105 @@ Appearance = { style = "Breeze"; icon_theme = config.gtk.iconTheme.name; - color_scheme = "catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}"; + color_scheme_path = "/home/${config.userOptions.username}/.config/qt5ct/qt5ct.conf"; + custom_palette = true; standard_dialogs = "default"; }; - Fonts = { - fixed = "\"${config.userOptions.fontMono.name},${config.userOptions.fontMono.name}\""; - general = "\"${config.userOptions.fontSans.name},${toString config.userOptions.fontSans.size}\""; - }; + Fonts = config.qt.qt6ctSettings.Fonts; + ColorScheme = config.qt.qt6ctSettings.ColorScheme; }; qt6ctSettings = { Appearance = { style = "Breeze"; icon_theme = config.gtk.iconTheme.name; - color_scheme = "catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}"; + color_scheme_path = "/home/${config.userOptions.username}/.config/qt6ct/qt6ct.conf"; + custom_palette = true; standard_dialogs = "default"; }; Fonts = { fixed = "\"${config.userOptions.fontMono.name},${config.userOptions.fontMono.name}\""; general = "\"${config.userOptions.fontSans.name},${toString config.userOptions.fontSans.size}\""; }; + ColorScheme = + let + c = pkgs.catppuccin.bare.${config.catppuccin.flavor}; + accent = c.${config.catppuccin.accent}; + mkColors = roles: builtins.concatStringsSep ", " (map (r: "#ff${r}") roles); + in + { + active_colors = mkColors [ + c.text + c.surface0 + c.surface1 + c.surface0 + c.base + c.mantle + c.text + c.text + c.text + c.base + c.mantle + c.crust + accent + c.base + accent + c.mauve + c.mantle + "000000" + c.base + c.text + c.overlay0 + accent + ]; + disabled_colors = mkColors [ + c.overlay0 + c.surface0 + c.surface1 + c.surface0 + c.overlay0 + c.mantle + c.overlay0 + c.text + c.overlay0 + c.surface0 + c.surface0 + c.mantle + c.overlay1 + c.text + "0000ff" + "ff00ff" + c.surface0 + "000000" + c.surface0 + c.base + "80000000" + c.overlay1 + ]; + inactive_colors = mkColors [ + c.text + c.surface0 + c.surface1 + c.surface0 + c.base + c.mantle + c.text + c.text + c.text + c.base + c.mantle + c.crust + accent + c.base + accent + c.mauve + c.mantle + "000000" + c.base + c.text + c.overlay0 + accent + ]; + }; }; };