diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9dd8c0d..b742f73 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,9 +3,9 @@ ## Adding a port Create a file in `modules//` with the name of the port. All ports should have -the `catppuccin.enable` and `catppuccin.flavour` options, and optionally the -`catppuccin.accent` option. `catppuccin.flavour` and `catppuccin.accent` should -default to `config.catppuccin.flavour` and `config.catppuccin.accent`, respectively. +the `catppuccin.enable` and `catppuccin.flavor` options, and optionally the +`catppuccin.accent` option. `catppuccin.flavor` and `catppuccin.accent` should +default to `config.catppuccin.flavor` and `config.catppuccin.accent`, respectively. [npins](https://github.com/andir/npins) is used to track our upstream sources to use in modules. This allows us to easily access and auto-update all themes. diff --git a/README.md b/README.md index 678b8e4..178927b 100644 --- a/README.md +++ b/README.md @@ -133,11 +133,11 @@ For [standalone installations](https://nix-community.github.io/home-manager/inde -2. Choose your desired flavour with `catppuccin.flavour` +2. Choose your desired flavor with `catppuccin.flavor` ```nix { - catppuccin.flavour = "mocha"; + catppuccin.flavor = "mocha"; } ``` diff --git a/modules/home-manager/alacritty.nix b/modules/home-manager/alacritty.nix index cae9d2d..131af5d 100644 --- a/modules/home-manager/alacritty.nix +++ b/modules/home-manager/alacritty.nix @@ -1,14 +1,13 @@ { config, lib, ... }: let - inherit (lib) ctp; inherit (config.catppuccin) sources; cfg = config.programs.alacritty.catppuccin; enable = cfg.enable && config.programs.alacritty.enable; in { - options.programs.alacritty.catppuccin = ctp.mkCatppuccinOpt "alacritty"; + options.programs.alacritty.catppuccin = lib.ctp.mkCatppuccinOpt "alacritty"; config = lib.mkIf enable { - programs.alacritty.settings = lib.importTOML "${sources.alacritty}/catppuccin-${cfg.flavour}.toml"; + programs.alacritty.settings = lib.importTOML "${sources.alacritty}/catppuccin-${cfg.flavor}.toml"; }; } diff --git a/modules/home-manager/bat.nix b/modules/home-manager/bat.nix index 5e37510..1ceee16 100644 --- a/modules/home-manager/bat.nix +++ b/modules/home-manager/bat.nix @@ -3,7 +3,7 @@ let inherit (config.catppuccin) sources; cfg = config.programs.bat.catppuccin; enable = cfg.enable && config.programs.bat.enable; - themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}"; + themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}"; in { options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt "bat"; diff --git a/modules/home-manager/bottom.nix b/modules/home-manager/bottom.nix index f32d5ea..302f34f 100644 --- a/modules/home-manager/bottom.nix +++ b/modules/home-manager/bottom.nix @@ -8,10 +8,8 @@ in options.programs.bottom.catppuccin = lib.ctp.mkCatppuccinOpt "bottom"; config = lib.mkIf enable { - programs.bottom = { - - settings = builtins.fromTOML (builtins.readFile "${sources.bottom}/themes/${cfg.flavour}.toml"); + settings = lib.importTOML "${sources.bottom}/themes/${cfg.flavor}.toml"; }; }; } diff --git a/modules/home-manager/btop.nix b/modules/home-manager/btop.nix index fea90a3..a23a5f6 100644 --- a/modules/home-manager/btop.nix +++ b/modules/home-manager/btop.nix @@ -4,7 +4,7 @@ let cfg = config.programs.btop.catppuccin; enable = cfg.enable && config.programs.btop.enable; - themeFile = "catppuccin_${cfg.flavour}.theme"; + themeFile = "catppuccin_${cfg.flavor}.theme"; themePath = "/themes/${themeFile}"; theme = sources.btop + themePath; in diff --git a/modules/home-manager/cava.nix b/modules/home-manager/cava.nix index 34806ae..17e030e 100644 --- a/modules/home-manager/cava.nix +++ b/modules/home-manager/cava.nix @@ -1,8 +1,6 @@ { config, lib, ... }: let - inherit (lib) ctp; inherit (config.catppuccin) sources; - cfg = config.programs.cava.catppuccin; enable = cfg.enable && config.programs.cava.enable; in @@ -10,6 +8,6 @@ in options.programs.cava.catppuccin = lib.ctp.mkCatppuccinOpt "cava"; config.programs.cava = lib.mkIf enable { - settings = lib.ctp.fromINIRaw (sources.cava + /themes/${cfg.flavour}.cava); + settings = lib.ctp.fromINIRaw (sources.cava + "/themes/${cfg.flavor}.cava"); }; } diff --git a/modules/home-manager/delta.nix b/modules/home-manager/delta.nix index d73c9b8..7c2a44c 100644 --- a/modules/home-manager/delta.nix +++ b/modules/home-manager/delta.nix @@ -10,7 +10,7 @@ in config = lib.mkIf enable { programs.git = { includes = [ { path = "${sources.delta}/catppuccin.gitconfig"; } ]; - delta.options.features = "catppuccin-${cfg.flavour}"; + delta.options.features = "catppuccin-${cfg.flavor}"; }; }; } diff --git a/modules/home-manager/dunst.nix b/modules/home-manager/dunst.nix index b55818f..af4eed8 100644 --- a/modules/home-manager/dunst.nix +++ b/modules/home-manager/dunst.nix @@ -1,7 +1,6 @@ { config, lib, ... }: let inherit (config.catppuccin) sources; - cfg = config.services.dunst.catppuccin; enable = cfg.enable && config.services.dunst.enable; in @@ -9,6 +8,6 @@ in options.services.dunst.catppuccin = lib.ctp.mkCatppuccinOpt "dunst"; config.services.dunst = lib.mkIf enable { - settings = lib.ctp.fromINI (sources.dunst + /themes/${cfg.flavour}.conf); + settings = lib.ctp.fromINI (sources.dunst + "/themes/${cfg.flavor}.conf"); }; } diff --git a/modules/home-manager/fcitx5.nix b/modules/home-manager/fcitx5.nix index d01c28d..15d4845 100644 --- a/modules/home-manager/fcitx5.nix +++ b/modules/home-manager/fcitx5.nix @@ -17,14 +17,14 @@ in }; config = lib.mkIf enable { - xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavour}" = { - source = "${sources.fcitx5}/src/catppuccin-${cfg.flavour}"; + xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavor}" = { + source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}"; recursive = true; }; xdg.configFile."fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply { text = lib.generators.toINIWithGlobalSection { } { - globalSection.Theme = "catppuccin-${cfg.flavour}"; + globalSection.Theme = "catppuccin-${cfg.flavor}"; }; }; }; diff --git a/modules/home-manager/fish.nix b/modules/home-manager/fish.nix index d51c14c..dd4a431 100644 --- a/modules/home-manager/fish.nix +++ b/modules/home-manager/fish.nix @@ -4,7 +4,7 @@ let cfg = config.programs.fish.catppuccin; enable = cfg.enable && config.programs.fish.enable; - themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}"; + themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}"; themePath = "/themes/${themeName}.theme"; in { diff --git a/modules/home-manager/foot.nix b/modules/home-manager/foot.nix index ff95740..3db25d1 100644 --- a/modules/home-manager/foot.nix +++ b/modules/home-manager/foot.nix @@ -4,7 +4,7 @@ let cfg = config.programs.foot.catppuccin; enable = cfg.enable && config.programs.foot.enable; - theme = lib.ctp.fromINI (sources.foot + "/themes/catppuccin-${cfg.flavour}.ini"); + theme = lib.ctp.fromINI (sources.foot + "/themes/catppuccin-${cfg.flavor}.ini"); in { options.programs.foot.catppuccin = lib.ctp.mkCatppuccinOpt "foot"; diff --git a/modules/home-manager/fzf.nix b/modules/home-manager/fzf.nix index 4807f1d..4761efb 100644 --- a/modules/home-manager/fzf.nix +++ b/modules/home-manager/fzf.nix @@ -4,7 +4,7 @@ let cfg = config.programs.fzf.catppuccin; enable = cfg.enable && config.programs.fzf.enable; - palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors; + palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors; in { options.programs.fzf.catppuccin = lib.ctp.mkCatppuccinOpt "fzf"; diff --git a/modules/home-manager/gh-dash.nix b/modules/home-manager/gh-dash.nix index 34a6983..5bdd6cf 100644 --- a/modules/home-manager/gh-dash.nix +++ b/modules/home-manager/gh-dash.nix @@ -3,7 +3,7 @@ let inherit (config.catppuccin) sources; cfg = config.programs.gh-dash.catppuccin; enable = cfg.enable && config.programs.gh-dash.enable; - theme = "${sources.gh-dash}/themes/${cfg.flavour}/catppuccin-${cfg.flavour}-${cfg.accent}.yml"; + theme = "${sources.gh-dash}/themes/${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}.yml"; in { options.programs.gh-dash.catppuccin = lib.ctp.mkCatppuccinOpt "gh-dash" // { diff --git a/modules/home-manager/gitui.nix b/modules/home-manager/gitui.nix index c6f25b2..b00879b 100644 --- a/modules/home-manager/gitui.nix +++ b/modules/home-manager/gitui.nix @@ -10,8 +10,8 @@ in config = lib.mkIf enable { programs.gitui.theme = builtins.path { - name = "${cfg.flavour}.ron"; - path = "${sources.gitui}/theme/${cfg.flavour}.ron"; + name = "${cfg.flavor}.ron"; + path = "${sources.gitui}/theme/${cfg.flavor}.ron"; }; }; } diff --git a/modules/home-manager/glamour.nix b/modules/home-manager/glamour.nix index 04e3f07..73180f3 100644 --- a/modules/home-manager/glamour.nix +++ b/modules/home-manager/glamour.nix @@ -9,7 +9,7 @@ in config = { home.sessionVariables = lib.mkIf enable { - GLAMOUR_STYLE = "${sources.glamour}/themes/catppuccin-${cfg.flavour}.json"; + GLAMOUR_STYLE = "${sources.glamour}/themes/catppuccin-${cfg.flavor}.json"; }; }; } diff --git a/modules/home-manager/globals.nix b/modules/home-manager/globals.nix index 0f66e18..dbe97a7 100644 --- a/modules/home-manager/globals.nix +++ b/modules/home-manager/globals.nix @@ -3,10 +3,10 @@ options.catppuccin = { enable = lib.mkEnableOption "Catppuccin globally"; - flavour = lib.mkOption { - type = lib.ctp.types.flavourOption; + flavor = lib.mkOption { + type = lib.ctp.types.flavorOption; default = "mocha"; - description = "Global Catppuccin flavour"; + description = "Global Catppuccin flavor"; }; accent = lib.mkOption { diff --git a/modules/home-manager/gtk.nix b/modules/home-manager/gtk.nix index a661f68..992e34f 100644 --- a/modules/home-manager/gtk.nix +++ b/modules/home-manager/gtk.nix @@ -58,43 +58,40 @@ in gtk = { theme = let - flavourUpper = ctp.mkUpper cfg.flavour; + flavorUpper = ctp.mkUpper cfg.flavor; accentUpper = ctp.mkUpper cfg.accent; sizeUpper = ctp.mkUpper cfg.size; # use the light gtk theme for latte - gtkTheme = if cfg.flavour == "latte" then "Light" else "Dark"; + gtkTheme = if cfg.flavor == "latte" then "Light" else "Dark"; in { - name = "Catppuccin-${flavourUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}"; + name = "Catppuccin-${flavorUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}"; package = pkgs.catppuccin-gtk.override { inherit (cfg) size tweaks; accents = [ cfg.accent ]; - variant = cfg.flavour; + variant = cfg.flavor; }; }; cursorTheme = let - flavourUpper = ctp.mkUpper cfg.cursor.flavour; + flavorUpper = ctp.mkUpper cfg.cursor.flavor; accentUpper = ctp.mkUpper cfg.cursor.accent; in lib.mkIf cfg.cursor.enable { - name = "Catppuccin-${flavourUpper}-${accentUpper}-Cursors"; - package = pkgs.catppuccin-cursors.${cfg.cursor.flavour + accentUpper}; + name = "Catppuccin-${flavorUpper}-${accentUpper}-Cursors"; + package = pkgs.catppuccin-cursors.${cfg.cursor.flavor + accentUpper}; }; iconTheme = let # use the light icon theme for latte - polarity = if cfg.icon.flavour == "latte" then "Light" else "Dark"; + polarity = if cfg.icon.flavor == "latte" then "Light" else "Dark"; in lib.mkIf cfg.icon.enable { name = "Papirus-${polarity}"; - package = pkgs.catppuccin-papirus-folders.override { - flavor = cfg.icon.flavour; - inherit (cfg.icon) accent; - }; + package = pkgs.catppuccin-papirus-folders.override { inherit (cfg.icon) accent flavor; }; }; }; @@ -119,7 +116,7 @@ in inherit (config.gtk.theme) name; }; "org/gnome/desktop/interface" = { - color-scheme = if cfg.flavour == "latte" then "default" else "prefer-dark"; + color-scheme = if cfg.flavor == "latte" then "default" else "prefer-dark"; }; }; }; diff --git a/modules/home-manager/helix.nix b/modules/home-manager/helix.nix index bf4e581..67b6920 100644 --- a/modules/home-manager/helix.nix +++ b/modules/home-manager/helix.nix @@ -5,25 +5,22 @@ let enable = cfg.enable && config.programs.helix.enable; in { - options.programs.helix.catppuccin = - with lib; - ctp.mkCatppuccinOpt "helix" - // { - useItalics = mkEnableOption "Italics in Catppuccin theme for Helix"; - }; + options.programs.helix.catppuccin = lib.ctp.mkCatppuccinOpt "helix" // { + useItalics = lib.mkEnableOption "Italics in Catppuccin theme for Helix"; + }; - config.programs.helix = - let - subdir = if cfg.useItalics then "default" else "no_italics"; - in - lib.mkIf enable { - settings = { - theme = "catppuccin-${cfg.flavour}"; - editor.color-modes = lib.mkDefault true; + config = lib.mkIf enable { + programs.helix = + let + subdir = if cfg.useItalics then "default" else "no_italics"; + in + { + settings = { + theme = "catppuccin-${cfg.flavor}"; + editor.color-modes = lib.mkDefault true; + }; + + themes."catppuccin-${cfg.flavor}" = lib.importTOML "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavor}.toml"; }; - - themes."catppuccin-${cfg.flavour}" = builtins.fromTOML ( - builtins.readFile "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavour}.toml" - ); - }; + }; } diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 388167c..9f4e249 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -11,7 +11,7 @@ in config.wayland.windowManager.hyprland.settings = lib.mkIf enable { source = [ - "${sources.hyprland}/themes/${cfg.flavour}.conf" + "${sources.hyprland}/themes/${cfg.flavor}.conf" (builtins.toFile "hyprland-${cfg.accent}-accent.conf" '' $accent=''$${cfg.accent} $accentAlpha=''$${cfg.accent}Alpha diff --git a/modules/home-manager/imv.nix b/modules/home-manager/imv.nix index a4e0b78..4bc7a16 100644 --- a/modules/home-manager/imv.nix +++ b/modules/home-manager/imv.nix @@ -8,6 +8,6 @@ in options.programs.imv.catppuccin = lib.ctp.mkCatppuccinOpt "imv"; config.programs.imv.settings = lib.mkIf enable ( - lib.ctp.fromINI (sources.imv + /themes/${cfg.flavour}.config) + lib.ctp.fromINI (sources.imv + "/themes/${cfg.flavor}.config") ); } diff --git a/modules/home-manager/k9s.nix b/modules/home-manager/k9s.nix index e2b6096..1331f14 100644 --- a/modules/home-manager/k9s.nix +++ b/modules/home-manager/k9s.nix @@ -5,14 +5,14 @@ let cfg = config.programs.k9s.catppuccin; enable = cfg.enable && config.programs.k9s.enable; - themeName = "catppuccin-${cfg.flavour}" + lib.optionalString cfg.transparent "-transparent"; + themeName = "catppuccin-${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent"; themeFile = "${themeName}.yaml"; themePath = "/skins/${themeFile}"; theme = sources.k9s + "/dist/${themeFile}"; in { options.programs.k9s.catppuccin = lib.ctp.mkCatppuccinOpt "k9s" // { - transparent = lib.mkEnableOption "transparent version of flavour"; + transparent = lib.mkEnableOption "transparent version of flavor"; }; config = lib.mkIf enable { diff --git a/modules/home-manager/kitty.nix b/modules/home-manager/kitty.nix index 98ee9ee..a5ea5eb 100644 --- a/modules/home-manager/kitty.nix +++ b/modules/home-manager/kitty.nix @@ -7,5 +7,5 @@ in { options.programs.kitty.catppuccin = ctp.mkCatppuccinOpt "kitty"; - config.programs.kitty = lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavour}"; }; + config.programs.kitty = lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavor}"; }; } diff --git a/modules/home-manager/lazygit.nix b/modules/home-manager/lazygit.nix index ba5faee..52fbc51 100644 --- a/modules/home-manager/lazygit.nix +++ b/modules/home-manager/lazygit.nix @@ -5,7 +5,7 @@ let cfg = config.programs.lazygit.catppuccin; enable = cfg.enable && config.programs.lazygit.enable; - themePath = "/${cfg.flavour}/${cfg.accent}.yml"; + themePath = "/${cfg.flavor}/${cfg.accent}.yml"; in { options.programs.lazygit.catppuccin = lib.ctp.mkCatppuccinOpt "lazygit" // { diff --git a/modules/home-manager/mako.nix b/modules/home-manager/mako.nix index 485b98d..c7d9852 100644 --- a/modules/home-manager/mako.nix +++ b/modules/home-manager/mako.nix @@ -8,7 +8,7 @@ let inherit (config.catppuccin) sources; cfg = config.services.mako.catppuccin; enable = cfg.enable && config.services.mako.enable; - theme = lib.ctp.fromINI (sources.mako + /src/${cfg.flavour}); + theme = lib.ctp.fromINI (sources.mako + "/src/${cfg.flavor}"); # Settings that need to be extracted and put in extraConfig extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme; diff --git a/modules/home-manager/micro.nix b/modules/home-manager/micro.nix index be51f89..59fc0d3 100644 --- a/modules/home-manager/micro.nix +++ b/modules/home-manager/micro.nix @@ -4,7 +4,7 @@ let cfg = config.programs.micro.catppuccin; enable = cfg.enable && config.programs.micro.enable; - themePath = "catppuccin-${cfg.flavour}.micro"; + themePath = "catppuccin-${cfg.flavor}.micro"; in { options.programs.micro.catppuccin = lib.ctp.mkCatppuccinOpt "micro"; diff --git a/modules/home-manager/mpv.nix b/modules/home-manager/mpv.nix index 489566e..5f6b760 100644 --- a/modules/home-manager/mpv.nix +++ b/modules/home-manager/mpv.nix @@ -3,7 +3,7 @@ let inherit (config.catppuccin) sources; cfg = config.programs.mpv.catppuccin; enable = cfg.enable && config.programs.mpv.enable; - themeDir = sources.mpv + /themes/${cfg.flavour}/${cfg.accent}; + themeDir = sources.mpv + "/themes/${cfg.flavor}/${cfg.accent}"; in { options.programs.mpv.catppuccin = lib.ctp.mkCatppuccinOpt "mpv" // { diff --git a/modules/home-manager/neovim.nix b/modules/home-manager/neovim.nix index d781127..9faa858 100644 --- a/modules/home-manager/neovim.nix +++ b/modules/home-manager/neovim.nix @@ -23,7 +23,7 @@ in require("catppuccin").setup({ compile_path = compile_path, - flavour = "${cfg.flavour}", + flavour = "${cfg.flavor}", }) vim.api.nvim_command("colorscheme catppuccin") diff --git a/modules/home-manager/polybar.nix b/modules/home-manager/polybar.nix index fd0680d..4f61a19 100644 --- a/modules/home-manager/polybar.nix +++ b/modules/home-manager/polybar.nix @@ -8,6 +8,6 @@ in options.services.polybar.catppuccin = lib.ctp.mkCatppuccinOpt "polybar"; config.services.polybar.extraConfig = lib.mkIf enable ( - builtins.readFile "${sources.polybar}/themes/${cfg.flavour}.ini" + builtins.readFile "${sources.polybar}/themes/${cfg.flavor}.ini" ); } diff --git a/modules/home-manager/rio.nix b/modules/home-manager/rio.nix index 64b043a..578e14b 100644 --- a/modules/home-manager/rio.nix +++ b/modules/home-manager/rio.nix @@ -10,6 +10,6 @@ in options.programs.rio.catppuccin = ctp.mkCatppuccinOpt "rio"; config = lib.mkIf enable { - programs.rio.settings = lib.importTOML "${sources.rio}/catppuccin-${cfg.flavour}.toml"; + programs.rio.settings = lib.importTOML "${sources.rio}/catppuccin-${cfg.flavor}.toml"; }; } diff --git a/modules/home-manager/rofi.nix b/modules/home-manager/rofi.nix index c1f1ae0..6e9276e 100644 --- a/modules/home-manager/rofi.nix +++ b/modules/home-manager/rofi.nix @@ -11,8 +11,8 @@ in config.programs.rofi = lib.mkIf enable { theme = { "@theme" = builtins.path { - name = "catppuccin-${cfg.flavour}.rasi"; - path = "${sources.rofi}/basic/.local/share/rofi/themes/catppuccin-${cfg.flavour}.rasi"; + name = "catppuccin-${cfg.flavor}.rasi"; + path = "${sources.rofi}/basic/.local/share/rofi/themes/catppuccin-${cfg.flavor}.rasi"; }; }; }; diff --git a/modules/home-manager/skim.nix b/modules/home-manager/skim.nix index 6d25038..450be58 100644 --- a/modules/home-manager/skim.nix +++ b/modules/home-manager/skim.nix @@ -3,7 +3,7 @@ let inherit (config.catppuccin) sources; cfg = config.programs.skim.catppuccin; enable = cfg.enable && config.programs.skim.enable; - palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors; + palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors; in { options.programs.skim.catppuccin = lib.ctp.mkCatppuccinOpt "skim"; diff --git a/modules/home-manager/starship.nix b/modules/home-manager/starship.nix index 548128e..5e2514d 100644 --- a/modules/home-manager/starship.nix +++ b/modules/home-manager/starship.nix @@ -10,8 +10,8 @@ in config.programs.starship.settings = lib.mkIf enable ( { format = lib.mkDefault "$all"; - palette = "catppuccin_${cfg.flavour}"; + palette = "catppuccin_${cfg.flavor}"; } - // builtins.fromTOML (builtins.readFile "${sources.starship}/palettes/${cfg.flavour}.toml") + // lib.importTOML "${sources.starship}/palettes/${cfg.flavor}.toml" ); } diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index 9f8067c..414d396 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -3,12 +3,14 @@ let inherit (config.catppuccin) sources; cfg = config.wayland.windowManager.sway.catppuccin; enable = cfg.enable && config.wayland.windowManager.sway.enable; - theme = "${sources.sway}/themes/catppuccin-${cfg.flavour}"; + theme = "${sources.sway}/themes/catppuccin-${cfg.flavor}"; in { options.wayland.windowManager.sway.catppuccin = lib.ctp.mkCatppuccinOpt "sway"; - config.wayland.windowManager.sway.extraConfigEarly = lib.mkIf enable '' - include ${theme} - ''; + config = lib.mkIf enable { + wayland.windowManager.sway.extraConfigEarly = '' + include ${theme} + ''; + }; } diff --git a/modules/home-manager/swaylock.nix b/modules/home-manager/swaylock.nix index 5c99aca..e135324 100644 --- a/modules/home-manager/swaylock.nix +++ b/modules/home-manager/swaylock.nix @@ -7,7 +7,7 @@ in { options.programs.swaylock.catppuccin = lib.ctp.mkCatppuccinOpt "swaylock"; - config.programs.swaylock.settings = lib.mkIf enable ( - lib.ctp.fromINI (sources.swaylock + /themes/${cfg.flavour}.conf) - ); + config = lib.mkIf enable { + programs.swaylock.settings = lib.ctp.fromINI (sources.swaylock + "/themes/${cfg.flavor}.conf"); + }; } diff --git a/modules/home-manager/tmux.nix b/modules/home-manager/tmux.nix index 94a7951..e1928f0 100644 --- a/modules/home-manager/tmux.nix +++ b/modules/home-manager/tmux.nix @@ -40,7 +40,7 @@ in inherit plugin; extraConfig = concatStrings [ '' - set -g @catppuccin_flavour '${cfg.flavour}' + set -g @catppuccin_flavour '${cfg.flavor}' '' cfg.extraConfig ]; diff --git a/modules/home-manager/tofi.nix b/modules/home-manager/tofi.nix index 5bc0df7..461aeec 100644 --- a/modules/home-manager/tofi.nix +++ b/modules/home-manager/tofi.nix @@ -14,6 +14,6 @@ in }; config.programs.tofi = lib.mkIf enable { - settings = lib.ctp.fromINI (sources.tofi + /catppuccin-${cfg.flavour}); + settings = lib.ctp.fromINI (sources.tofi + "/catppuccin-${cfg.flavor}"); }; } diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix index 057a676..6089d1b 100644 --- a/modules/home-manager/waybar.nix +++ b/modules/home-manager/waybar.nix @@ -3,7 +3,7 @@ let inherit (config.catppuccin) sources; cfg = config.programs.waybar.catppuccin; enable = cfg.enable && config.programs.waybar.enable; - styleFile = "${sources.waybar}/themes/${cfg.flavour}.css"; + styleFile = "${sources.waybar}/themes/${cfg.flavor}.css"; in { options.programs.waybar.catppuccin = (lib.ctp.mkCatppuccinOpt "waybar") // { diff --git a/modules/home-manager/yazi.nix b/modules/home-manager/yazi.nix index f4b6402..e405ee6 100644 --- a/modules/home-manager/yazi.nix +++ b/modules/home-manager/yazi.nix @@ -9,7 +9,7 @@ in options.programs.yazi.catppuccin = lib.ctp.mkCatppuccinOpt "yazi"; config = lib.mkIf enable { - programs.yazi.theme = lib.importTOML "${sources.yazi}/themes/${cfg.flavour}.toml"; - xdg.configFile."yazi/Catppuccin-${cfg.flavour}.tmTheme".source = "${sources.bat}/themes/Catppuccin ${lib.ctp.mkUpper cfg.flavour}.tmTheme"; + programs.yazi.theme = lib.importTOML "${sources.yazi}/themes/${cfg.flavor}.toml"; + xdg.configFile."yazi/Catppuccin-${cfg.flavor}.tmTheme".source = "${sources.bat}/themes/Catppuccin ${lib.ctp.mkUpper cfg.flavor}.tmTheme"; }; } diff --git a/modules/home-manager/zathura.nix b/modules/home-manager/zathura.nix index 6c50986..ba65655 100644 --- a/modules/home-manager/zathura.nix +++ b/modules/home-manager/zathura.nix @@ -8,7 +8,7 @@ let inherit (config.catppuccin) sources; cfg = config.programs.zathura.catppuccin; enable = cfg.enable && config.programs.zathura.enable; - themeFile = sources.zathura + /src/catppuccin-${cfg.flavour}; + themeFile = sources.zathura + "/src/catppuccin-${cfg.flavor}"; in { options.programs.zathura.catppuccin = lib.ctp.mkCatppuccinOpt "zathura"; diff --git a/modules/home-manager/zellij.nix b/modules/home-manager/zellij.nix index d6bc3b5..9592882 100644 --- a/modules/home-manager/zellij.nix +++ b/modules/home-manager/zellij.nix @@ -2,7 +2,7 @@ let cfg = config.programs.zellij.catppuccin; enable = cfg.enable && config.programs.zellij.enable; - themeName = "catppuccin-${cfg.flavour}"; + themeName = "catppuccin-${cfg.flavor}"; in { options.programs.zellij.catppuccin = lib.ctp.mkCatppuccinOpt "zellij"; diff --git a/modules/home-manager/zsh-syntax-highlighting.nix b/modules/home-manager/zsh-syntax-highlighting.nix index cb7c35d..59b886c 100644 --- a/modules/home-manager/zsh-syntax-highlighting.nix +++ b/modules/home-manager/zsh-syntax-highlighting.nix @@ -10,7 +10,7 @@ in config.programs.zsh = lib.mkIf enable { initExtra = lib.mkBefore '' - source '${sources.zsh-syntax-highlighting}/themes/catppuccin_${cfg.flavour}-zsh-syntax-highlighting.zsh' + source '${sources.zsh-syntax-highlighting}/themes/catppuccin_${cfg.flavor}-zsh-syntax-highlighting.zsh' ''; }; } diff --git a/modules/lib/default.nix b/modules/lib/default.nix index 8ed4cd0..ef9359e 100644 --- a/modules/lib/default.nix +++ b/modules/lib/default.nix @@ -12,7 +12,7 @@ in # string -> type -> string -> a -> a # this is an internal function and shouldn't be # used unless you know what you're doing. it takes - # a string (the name of the property, i.e., flavour + # a string (the name of the property, i.e., flavor # or accent), the type of the property, the name of # the module, followed by local config attrset mkBasicOpt = @@ -24,13 +24,13 @@ in }; # string -> a -> a - # this creates a flavour option for modules + # this creates a flavor option for modules # the first string should be the name of the module, # followed by the local config attrset - mkFlavourOpt = ctp.mkBasicOpt "flavour" ctp.types.flavourOption; + mkFlavourOpt = ctp.mkBasicOpt "flavor" ctp.types.flavorOption; types = { - flavourOption = lib.types.enum [ + flavorOption = lib.types.enum [ "latte" "frappe" "macchiato" @@ -107,14 +107,14 @@ in # string -> a -> a # this creates a basic attrset only containing an - # enable and flavour option. the fist string should + # enable and flavor option. the fist string should # be the name of the module, followed by the local config # attrset mkCatppuccinOpt = name: { enable = lib.mkEnableOption "Catppuccin theme" // { default = config.catppuccin.enable; }; - flavour = ctp.mkFlavourOpt name; + flavor = ctp.mkFlavourOpt name; }; # string -> a -> a diff --git a/modules/nixos/console.nix b/modules/nixos/console.nix index c41e3b8..38d1293 100644 --- a/modules/nixos/console.nix +++ b/modules/nixos/console.nix @@ -3,7 +3,7 @@ let inherit (config.catppuccin) sources; cfg = config.console.catppuccin; enable = cfg.enable && config.console.enable; - palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors; + palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors; in { options.console.catppuccin = lib.ctp.mkCatppuccinOpt "console"; diff --git a/modules/nixos/globals.nix b/modules/nixos/globals.nix index 0f66e18..dbe97a7 100644 --- a/modules/nixos/globals.nix +++ b/modules/nixos/globals.nix @@ -3,10 +3,10 @@ options.catppuccin = { enable = lib.mkEnableOption "Catppuccin globally"; - flavour = lib.mkOption { - type = lib.ctp.types.flavourOption; + flavor = lib.mkOption { + type = lib.ctp.types.flavorOption; default = "mocha"; - description = "Global Catppuccin flavour"; + description = "Global Catppuccin flavor"; }; accent = lib.mkOption { diff --git a/modules/nixos/grub.nix b/modules/nixos/grub.nix index 1cc07d4..0b28efe 100644 --- a/modules/nixos/grub.nix +++ b/modules/nixos/grub.nix @@ -12,7 +12,7 @@ let # TODO @getchoo: upstream this in nixpkgs maybe? idk if they have grub themes theme = pkgs.runCommand "catppuccin-grub-theme" { } '' mkdir -p "$out" - cp -r ${sources.grub}/src/catppuccin-${cfg.flavour}-grub-theme/* "$out"/ + cp -r ${sources.grub}/src/catppuccin-${cfg.flavor}-grub-theme/* "$out"/ ''; in { diff --git a/modules/nixos/plymouth.nix b/modules/nixos/plymouth.nix index 62a54f2..f5cdf5c 100644 --- a/modules/nixos/plymouth.nix +++ b/modules/nixos/plymouth.nix @@ -13,7 +13,7 @@ in options.boot.plymouth.catppuccin = ctp.mkCatppuccinOpt "plymouth"; config.boot.plymouth = mkIf enable { - theme = "catppuccin-${cfg.flavour}"; - themePackages = [ (pkgs.catppuccin-plymouth.override { variant = cfg.flavour; }) ]; + theme = "catppuccin-${cfg.flavor}"; + themePackages = [ (pkgs.catppuccin-plymouth.override { variant = cfg.flavor; }) ]; }; } diff --git a/modules/nixos/sddm.nix b/modules/nixos/sddm.nix index ff0c795..f79c930 100644 --- a/modules/nixos/sddm.nix +++ b/modules/nixos/sddm.nix @@ -52,8 +52,8 @@ in mkIf enable { environment.systemPackages = [ (pkgs.catppuccin-sddm.override { - flavor = cfg.flavour; inherit (cfg) + flavor font fontSize background @@ -63,6 +63,6 @@ in ]; } // mkIf (enable && versionAtLeast ctp.getModuleRelease minVersion) { - services.displayManager.sddm.theme = "catppuccin-${cfg.flavour}"; + services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}"; }; }