Skip to content

Commit fea5242

Browse files
authored
feat(modules)!: flavour -> flavor (catppuccin#190)
1 parent ac87622 commit fea5242

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+101
-111
lines changed

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Adding a port
44

55
Create a file in `modules/<module>/` with the name of the port. All ports should have
6-
the `catppuccin.enable` and `catppuccin.flavour` options, and optionally the
7-
`catppuccin.accent` option. `catppuccin.flavour` and `catppuccin.accent` should
8-
default to `config.catppuccin.flavour` and `config.catppuccin.accent`, respectively.
6+
the `catppuccin.enable` and `catppuccin.flavor` options, and optionally the
7+
`catppuccin.accent` option. `catppuccin.flavor` and `catppuccin.accent` should
8+
default to `config.catppuccin.flavor` and `config.catppuccin.accent`, respectively.
99

1010
[npins](https://github.com/andir/npins) is used to track our upstream
1111
sources to use in modules. This allows us to easily access and auto-update all themes.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ For [standalone installations](https://nix-community.github.io/home-manager/inde
133133

134134
</details>
135135

136-
2. Choose your desired flavour with `catppuccin.flavour`
136+
2. Choose your desired flavor with `catppuccin.flavor`
137137

138138
```nix
139139
{
140-
catppuccin.flavour = "mocha";
140+
catppuccin.flavor = "mocha";
141141
}
142142
```
143143

modules/home-manager/alacritty.nix

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{ config, lib, ... }:
22
let
3-
inherit (lib) ctp;
43
inherit (config.catppuccin) sources;
54
cfg = config.programs.alacritty.catppuccin;
65
enable = cfg.enable && config.programs.alacritty.enable;
76
in
87
{
9-
options.programs.alacritty.catppuccin = ctp.mkCatppuccinOpt "alacritty";
8+
options.programs.alacritty.catppuccin = lib.ctp.mkCatppuccinOpt "alacritty";
109

1110
config = lib.mkIf enable {
12-
programs.alacritty.settings = lib.importTOML "${sources.alacritty}/catppuccin-${cfg.flavour}.toml";
11+
programs.alacritty.settings = lib.importTOML "${sources.alacritty}/catppuccin-${cfg.flavor}.toml";
1312
};
1413
}

modules/home-manager/bat.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ let
33
inherit (config.catppuccin) sources;
44
cfg = config.programs.bat.catppuccin;
55
enable = cfg.enable && config.programs.bat.enable;
6-
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}";
6+
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
77
in
88
{
99
options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt "bat";

modules/home-manager/bottom.nix

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ in
88
options.programs.bottom.catppuccin = lib.ctp.mkCatppuccinOpt "bottom";
99

1010
config = lib.mkIf enable {
11-
1211
programs.bottom = {
13-
14-
settings = builtins.fromTOML (builtins.readFile "${sources.bottom}/themes/${cfg.flavour}.toml");
12+
settings = lib.importTOML "${sources.bottom}/themes/${cfg.flavor}.toml";
1513
};
1614
};
1715
}

modules/home-manager/btop.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let
44
cfg = config.programs.btop.catppuccin;
55
enable = cfg.enable && config.programs.btop.enable;
66

7-
themeFile = "catppuccin_${cfg.flavour}.theme";
7+
themeFile = "catppuccin_${cfg.flavor}.theme";
88
themePath = "/themes/${themeFile}";
99
theme = sources.btop + themePath;
1010
in

modules/home-manager/cava.nix

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{ config, lib, ... }:
22
let
3-
inherit (lib) ctp;
43
inherit (config.catppuccin) sources;
5-
64
cfg = config.programs.cava.catppuccin;
75
enable = cfg.enable && config.programs.cava.enable;
86
in
97
{
108
options.programs.cava.catppuccin = lib.ctp.mkCatppuccinOpt "cava";
119

1210
config.programs.cava = lib.mkIf enable {
13-
settings = lib.ctp.fromINIRaw (sources.cava + /themes/${cfg.flavour}.cava);
11+
settings = lib.ctp.fromINIRaw (sources.cava + "/themes/${cfg.flavor}.cava");
1412
};
1513
}

modules/home-manager/delta.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ in
1010
config = lib.mkIf enable {
1111
programs.git = {
1212
includes = [ { path = "${sources.delta}/catppuccin.gitconfig"; } ];
13-
delta.options.features = "catppuccin-${cfg.flavour}";
13+
delta.options.features = "catppuccin-${cfg.flavor}";
1414
};
1515
};
1616
}

modules/home-manager/dunst.nix

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
54
cfg = config.services.dunst.catppuccin;
65
enable = cfg.enable && config.services.dunst.enable;
76
in
87
{
98
options.services.dunst.catppuccin = lib.ctp.mkCatppuccinOpt "dunst";
109

1110
config.services.dunst = lib.mkIf enable {
12-
settings = lib.ctp.fromINI (sources.dunst + /themes/${cfg.flavour}.conf);
11+
settings = lib.ctp.fromINI (sources.dunst + "/themes/${cfg.flavor}.conf");
1312
};
1413
}

modules/home-manager/fcitx5.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ in
1717
};
1818

1919
config = lib.mkIf enable {
20-
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavour}" = {
21-
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavour}";
20+
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavor}" = {
21+
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}";
2222
recursive = true;
2323
};
2424

2525
xdg.configFile."fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply {
2626
text = lib.generators.toINIWithGlobalSection { } {
27-
globalSection.Theme = "catppuccin-${cfg.flavour}";
27+
globalSection.Theme = "catppuccin-${cfg.flavor}";
2828
};
2929
};
3030
};

modules/home-manager/fish.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let
44
cfg = config.programs.fish.catppuccin;
55
enable = cfg.enable && config.programs.fish.enable;
66

7-
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}";
7+
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
88
themePath = "/themes/${themeName}.theme";
99
in
1010
{

modules/home-manager/foot.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let
44

55
cfg = config.programs.foot.catppuccin;
66
enable = cfg.enable && config.programs.foot.enable;
7-
theme = lib.ctp.fromINI (sources.foot + "/themes/catppuccin-${cfg.flavour}.ini");
7+
theme = lib.ctp.fromINI (sources.foot + "/themes/catppuccin-${cfg.flavor}.ini");
88
in
99
{
1010
options.programs.foot.catppuccin = lib.ctp.mkCatppuccinOpt "foot";

modules/home-manager/fzf.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let
44

55
cfg = config.programs.fzf.catppuccin;
66
enable = cfg.enable && config.programs.fzf.enable;
7-
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors;
7+
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors;
88
in
99
{
1010
options.programs.fzf.catppuccin = lib.ctp.mkCatppuccinOpt "fzf";

modules/home-manager/gh-dash.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ let
33
inherit (config.catppuccin) sources;
44
cfg = config.programs.gh-dash.catppuccin;
55
enable = cfg.enable && config.programs.gh-dash.enable;
6-
theme = "${sources.gh-dash}/themes/${cfg.flavour}/catppuccin-${cfg.flavour}-${cfg.accent}.yml";
6+
theme = "${sources.gh-dash}/themes/${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}.yml";
77
in
88
{
99
options.programs.gh-dash.catppuccin = lib.ctp.mkCatppuccinOpt "gh-dash" // {

modules/home-manager/gitui.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ in
1010

1111
config = lib.mkIf enable {
1212
programs.gitui.theme = builtins.path {
13-
name = "${cfg.flavour}.ron";
14-
path = "${sources.gitui}/theme/${cfg.flavour}.ron";
13+
name = "${cfg.flavor}.ron";
14+
path = "${sources.gitui}/theme/${cfg.flavor}.ron";
1515
};
1616
};
1717
}

modules/home-manager/glamour.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ in
99

1010
config = {
1111
home.sessionVariables = lib.mkIf enable {
12-
GLAMOUR_STYLE = "${sources.glamour}/themes/catppuccin-${cfg.flavour}.json";
12+
GLAMOUR_STYLE = "${sources.glamour}/themes/catppuccin-${cfg.flavor}.json";
1313
};
1414
};
1515
}

modules/home-manager/globals.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
options.catppuccin = {
44
enable = lib.mkEnableOption "Catppuccin globally";
55

6-
flavour = lib.mkOption {
7-
type = lib.ctp.types.flavourOption;
6+
flavor = lib.mkOption {
7+
type = lib.ctp.types.flavorOption;
88
default = "mocha";
9-
description = "Global Catppuccin flavour";
9+
description = "Global Catppuccin flavor";
1010
};
1111

1212
accent = lib.mkOption {

modules/home-manager/gtk.nix

+10-13
Original file line numberDiff line numberDiff line change
@@ -58,43 +58,40 @@ in
5858
gtk = {
5959
theme =
6060
let
61-
flavourUpper = ctp.mkUpper cfg.flavour;
61+
flavorUpper = ctp.mkUpper cfg.flavor;
6262
accentUpper = ctp.mkUpper cfg.accent;
6363
sizeUpper = ctp.mkUpper cfg.size;
6464

6565
# use the light gtk theme for latte
66-
gtkTheme = if cfg.flavour == "latte" then "Light" else "Dark";
66+
gtkTheme = if cfg.flavor == "latte" then "Light" else "Dark";
6767
in
6868
{
69-
name = "Catppuccin-${flavourUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}";
69+
name = "Catppuccin-${flavorUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}";
7070
package = pkgs.catppuccin-gtk.override {
7171
inherit (cfg) size tweaks;
7272
accents = [ cfg.accent ];
73-
variant = cfg.flavour;
73+
variant = cfg.flavor;
7474
};
7575
};
7676

7777
cursorTheme =
7878
let
79-
flavourUpper = ctp.mkUpper cfg.cursor.flavour;
79+
flavorUpper = ctp.mkUpper cfg.cursor.flavor;
8080
accentUpper = ctp.mkUpper cfg.cursor.accent;
8181
in
8282
lib.mkIf cfg.cursor.enable {
83-
name = "Catppuccin-${flavourUpper}-${accentUpper}-Cursors";
84-
package = pkgs.catppuccin-cursors.${cfg.cursor.flavour + accentUpper};
83+
name = "Catppuccin-${flavorUpper}-${accentUpper}-Cursors";
84+
package = pkgs.catppuccin-cursors.${cfg.cursor.flavor + accentUpper};
8585
};
8686

8787
iconTheme =
8888
let
8989
# use the light icon theme for latte
90-
polarity = if cfg.icon.flavour == "latte" then "Light" else "Dark";
90+
polarity = if cfg.icon.flavor == "latte" then "Light" else "Dark";
9191
in
9292
lib.mkIf cfg.icon.enable {
9393
name = "Papirus-${polarity}";
94-
package = pkgs.catppuccin-papirus-folders.override {
95-
flavor = cfg.icon.flavour;
96-
inherit (cfg.icon) accent;
97-
};
94+
package = pkgs.catppuccin-papirus-folders.override { inherit (cfg.icon) accent flavor; };
9895
};
9996
};
10097

@@ -119,7 +116,7 @@ in
119116
inherit (config.gtk.theme) name;
120117
};
121118
"org/gnome/desktop/interface" = {
122-
color-scheme = if cfg.flavour == "latte" then "default" else "prefer-dark";
119+
color-scheme = if cfg.flavor == "latte" then "default" else "prefer-dark";
123120
};
124121
};
125122
};

modules/home-manager/helix.nix

+16-19
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,22 @@ let
55
enable = cfg.enable && config.programs.helix.enable;
66
in
77
{
8-
options.programs.helix.catppuccin =
9-
with lib;
10-
ctp.mkCatppuccinOpt "helix"
11-
// {
12-
useItalics = mkEnableOption "Italics in Catppuccin theme for Helix";
13-
};
8+
options.programs.helix.catppuccin = lib.ctp.mkCatppuccinOpt "helix" // {
9+
useItalics = lib.mkEnableOption "Italics in Catppuccin theme for Helix";
10+
};
1411

15-
config.programs.helix =
16-
let
17-
subdir = if cfg.useItalics then "default" else "no_italics";
18-
in
19-
lib.mkIf enable {
20-
settings = {
21-
theme = "catppuccin-${cfg.flavour}";
22-
editor.color-modes = lib.mkDefault true;
23-
};
12+
config = lib.mkIf enable {
13+
programs.helix =
14+
let
15+
subdir = if cfg.useItalics then "default" else "no_italics";
16+
in
17+
{
18+
settings = {
19+
theme = "catppuccin-${cfg.flavor}";
20+
editor.color-modes = lib.mkDefault true;
21+
};
2422

25-
themes."catppuccin-${cfg.flavour}" = builtins.fromTOML (
26-
builtins.readFile "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavour}.toml"
27-
);
28-
};
23+
themes."catppuccin-${cfg.flavor}" = lib.importTOML "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavor}.toml";
24+
};
25+
};
2926
}

modules/home-manager/hyprland.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ in
1111

1212
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
1313
source = [
14-
"${sources.hyprland}/themes/${cfg.flavour}.conf"
14+
"${sources.hyprland}/themes/${cfg.flavor}.conf"
1515
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
1616
$accent=''$${cfg.accent}
1717
$accentAlpha=''$${cfg.accent}Alpha

modules/home-manager/imv.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ in
88
options.programs.imv.catppuccin = lib.ctp.mkCatppuccinOpt "imv";
99

1010
config.programs.imv.settings = lib.mkIf enable (
11-
lib.ctp.fromINI (sources.imv + /themes/${cfg.flavour}.config)
11+
lib.ctp.fromINI (sources.imv + "/themes/${cfg.flavor}.config")
1212
);
1313
}

modules/home-manager/k9s.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ let
55
cfg = config.programs.k9s.catppuccin;
66
enable = cfg.enable && config.programs.k9s.enable;
77

8-
themeName = "catppuccin-${cfg.flavour}" + lib.optionalString cfg.transparent "-transparent";
8+
themeName = "catppuccin-${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent";
99
themeFile = "${themeName}.yaml";
1010
themePath = "/skins/${themeFile}";
1111
theme = sources.k9s + "/dist/${themeFile}";
1212
in
1313
{
1414
options.programs.k9s.catppuccin = lib.ctp.mkCatppuccinOpt "k9s" // {
15-
transparent = lib.mkEnableOption "transparent version of flavour";
15+
transparent = lib.mkEnableOption "transparent version of flavor";
1616
};
1717

1818
config = lib.mkIf enable {

modules/home-manager/kitty.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ in
77
{
88
options.programs.kitty.catppuccin = ctp.mkCatppuccinOpt "kitty";
99

10-
config.programs.kitty = lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavour}"; };
10+
config.programs.kitty = lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavor}"; };
1111
}

modules/home-manager/lazygit.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let
55
cfg = config.programs.lazygit.catppuccin;
66
enable = cfg.enable && config.programs.lazygit.enable;
77

8-
themePath = "/${cfg.flavour}/${cfg.accent}.yml";
8+
themePath = "/${cfg.flavor}/${cfg.accent}.yml";
99
in
1010
{
1111
options.programs.lazygit.catppuccin = lib.ctp.mkCatppuccinOpt "lazygit" // {

modules/home-manager/mako.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let
88
inherit (config.catppuccin) sources;
99
cfg = config.services.mako.catppuccin;
1010
enable = cfg.enable && config.services.mako.enable;
11-
theme = lib.ctp.fromINI (sources.mako + /src/${cfg.flavour});
11+
theme = lib.ctp.fromINI (sources.mako + "/src/${cfg.flavor}");
1212

1313
# Settings that need to be extracted and put in extraConfig
1414
extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme;

modules/home-manager/micro.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let
44
cfg = config.programs.micro.catppuccin;
55
enable = cfg.enable && config.programs.micro.enable;
66

7-
themePath = "catppuccin-${cfg.flavour}.micro";
7+
themePath = "catppuccin-${cfg.flavor}.micro";
88
in
99
{
1010
options.programs.micro.catppuccin = lib.ctp.mkCatppuccinOpt "micro";

modules/home-manager/mpv.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ let
33
inherit (config.catppuccin) sources;
44
cfg = config.programs.mpv.catppuccin;
55
enable = cfg.enable && config.programs.mpv.enable;
6-
themeDir = sources.mpv + /themes/${cfg.flavour}/${cfg.accent};
6+
themeDir = sources.mpv + "/themes/${cfg.flavor}/${cfg.accent}";
77
in
88
{
99
options.programs.mpv.catppuccin = lib.ctp.mkCatppuccinOpt "mpv" // {

modules/home-manager/neovim.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ in
2323
2424
require("catppuccin").setup({
2525
compile_path = compile_path,
26-
flavour = "${cfg.flavour}",
26+
flavour = "${cfg.flavor}",
2727
})
2828
2929
vim.api.nvim_command("colorscheme catppuccin")

0 commit comments

Comments
 (0)