Skip to content

Commit 70c9569

Browse files
isabelrosesWeathercoldgetchoo
committed
feat: move to catppuccin namespace
Co-authored-by: Weathercold <[email protected]> Co-authored-by: seth <[email protected]>
1 parent 21310cd commit 70c9569

Some content is hidden

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

56 files changed

+1033
-244
lines changed

modules/home-manager/aerc.nix

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@
33

44
let
55
inherit (config.catppuccin) sources;
6-
7-
cfg = config.programs.aerc.catppuccin;
6+
cfg = config.catppuccin.aerc;
87
themeName = "catppuccin-${cfg.flavor}";
98
in
10-
119
{
12-
options.programs.aerc.catppuccin = catppuccinLib.mkCatppuccinOption { name = "aerc"; };
10+
options.catppuccin.aerc = catppuccinLib.mkCatppuccinOption { name = "aerc"; };
11+
12+
imports = catppuccinLib.mkRenamedCatppuccinOpts {
13+
from = [
14+
"programs"
15+
"aerc"
16+
"catppuccin"
17+
];
18+
to = "aerc";
19+
};
1320

1421
config = lib.mkIf cfg.enable {
1522
programs.aerc = {

modules/home-manager/alacritty.nix

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@
33

44
let
55
inherit (config.catppuccin) sources;
6-
7-
cfg = config.programs.alacritty.catppuccin;
6+
cfg = config.catppuccin.alacritty;
87
in
9-
108
{
11-
options.programs.alacritty.catppuccin = catppuccinLib.mkCatppuccinOption { name = "alacritty"; };
9+
options.catppuccin.alacritty = catppuccinLib.mkCatppuccinOption { name = "alacritty"; };
10+
11+
imports = catppuccinLib.mkRenamedCatppuccinOpts {
12+
from = [
13+
"programs"
14+
"alacritty"
15+
"catppuccin"
16+
];
17+
to = "alacritty";
18+
};
1219

1320
config = lib.mkIf cfg.enable {
1421
programs.alacritty = {

modules/home-manager/all-modules.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
./bottom.nix
66
./btop.nix
77
./cava.nix
8-
./cursor.nix
8+
./cursors.nix
99
./delta.nix
1010
./dunst.nix
1111
./fcitx5.nix
@@ -41,7 +41,7 @@
4141
./sway.nix
4242
./tmux.nix
4343
./tofi.nix
44-
./obs-studio.nix
44+
./obs.nix
4545
./waybar.nix
4646
./yazi.nix
4747
./zathura.nix

modules/home-manager/bat.nix

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@
33

44
let
55
inherit (config.catppuccin) sources;
6-
7-
cfg = config.programs.bat.catppuccin;
6+
cfg = config.catppuccin.bat;
87
themeName = "Catppuccin ${catppuccinLib.mkUpper cfg.flavor}";
98
in
10-
119
{
12-
options.programs.bat.catppuccin = catppuccinLib.mkCatppuccinOption { name = "bat"; };
10+
options.catppuccin.bat = catppuccinLib.mkCatppuccinOption { name = "bat"; };
11+
12+
imports = catppuccinLib.mkRenamedCatppuccinOpts {
13+
from = [
14+
"programs"
15+
"bat"
16+
"catppuccin"
17+
];
18+
to = "bat";
19+
};
1320

1421
config = lib.mkIf cfg.enable {
1522
programs.bat = {

modules/home-manager/bottom.nix

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@
33

44
let
55
inherit (config.catppuccin) sources;
6-
7-
cfg = config.programs.bottom.catppuccin;
6+
cfg = config.catppuccin.bottom;
87
in
9-
108
{
11-
options.programs.bottom.catppuccin = catppuccinLib.mkCatppuccinOption { name = "bottom"; };
9+
options.catppuccin.bottom = catppuccinLib.mkCatppuccinOption { name = "bottom"; };
10+
11+
imports = catppuccinLib.mkRenamedCatppuccinOpts {
12+
from = [
13+
"programs"
14+
"bottom"
15+
"catppuccin"
16+
];
17+
to = "bottom";
18+
};
1219

1320
config = lib.mkIf cfg.enable {
1421
programs.bottom = {

modules/home-manager/btop.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
let
55
inherit (config.catppuccin) sources;
66

7-
cfg = config.programs.btop.catppuccin;
7+
cfg = config.catppuccin.btop;
88
enable = cfg.enable && config.programs.btop.enable;
99

1010
themeFile = "catppuccin_${cfg.flavor}.theme";
@@ -13,7 +13,16 @@ let
1313
in
1414

1515
{
16-
options.programs.btop.catppuccin = catppuccinLib.mkCatppuccinOption { name = "btop"; };
16+
options.catppuccin.btop = catppuccinLib.mkCatppuccinOption { name = "btop"; };
17+
18+
imports = catppuccinLib.mkRenamedCatppuccinOpts {
19+
from = [
20+
"programs"
21+
"btop"
22+
"catppuccin"
23+
];
24+
to = "btop";
25+
};
1726

1827
config = lib.mkIf enable {
1928
xdg.configFile = {

modules/home-manager/cava.nix

+27-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,39 @@
44
let
55
inherit (config.catppuccin) sources;
66

7-
cfg = config.programs.cava.catppuccin;
7+
cfg = config.catppuccin.cava;
88
flavor = "${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent";
99
in
10-
1110
{
12-
options.programs.cava.catppuccin = catppuccinLib.mkCatppuccinOption { name = "cava"; } // {
11+
options.catppuccin.cava = catppuccinLib.mkCatppuccinOption { name = "cava"; } // {
1312
transparent = lib.mkEnableOption "transparent version of flavor";
1413
};
1514

15+
imports =
16+
(catppuccinLib.mkRenamedCatppuccinOpts {
17+
from = [
18+
"programs"
19+
"cava"
20+
"catppuccin"
21+
];
22+
to = "cava";
23+
})
24+
++ [
25+
(lib.mkRenamedOptionModule
26+
[
27+
"programs"
28+
"cava"
29+
"catppuccin"
30+
"transparent"
31+
]
32+
[
33+
"catppuccin"
34+
"cava"
35+
"transparent"
36+
]
37+
)
38+
];
39+
1640
config = lib.mkIf cfg.enable {
1741
programs.cava = {
1842
settings = catppuccinLib.fromINIRaw (sources.cava + "/themes/${flavor}.cava");

modules/home-manager/cursor.nix modules/home-manager/cursors.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}:
88

99
let
10-
cfg = config.catppuccin.pointerCursor;
10+
cfg = config.catppuccin.cursors;
1111

1212
# "dark" and "light" can be used alongside the regular accents
1313
cursorAccentType = catppuccinLib.mergeEnums catppuccinLib.types.accent (
@@ -19,7 +19,7 @@ let
1919
in
2020

2121
{
22-
options.catppuccin.pointerCursor =
22+
options.catppuccin.cursors =
2323
catppuccinLib.mkCatppuccinOption {
2424
name = "pointer cursors";
2525
# NOTE: We exclude this as there is no `enable` option in the upstream
@@ -34,6 +34,15 @@ in
3434
};
3535
};
3636

37+
imports = catppuccinLib.mkRenamedCatppuccinOpts {
38+
from = [
39+
"catppuccin"
40+
"pointerCursor"
41+
];
42+
to = "cursors";
43+
accentSupport = true;
44+
};
45+
3746
config = lib.mkIf cfg.enable {
3847
home.pointerCursor = {
3948
name = "catppuccin-${cfg.flavor}-${cfg.accent}-cursors";

modules/home-manager/delta.nix

+12-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@
44
let
55
inherit (config.catppuccin) sources;
66

7-
cfg = config.programs.git.delta.catppuccin;
7+
cfg = config.catppuccin.delta;
88
enable = cfg.enable && config.programs.git.delta.enable;
99
in
1010

1111
{
12-
options.programs.git.delta.catppuccin = catppuccinLib.mkCatppuccinOption { name = "delta"; };
12+
options.catppuccin.delta = catppuccinLib.mkCatppuccinOption { name = "delta"; };
13+
14+
imports = catppuccinLib.mkRenamedCatppuccinOpts {
15+
from = [
16+
"programs"
17+
"git"
18+
"delta"
19+
"catppuccin"
20+
];
21+
to = "delta";
22+
};
1323

1424
config = lib.mkIf enable {
1525
programs.git = {

modules/home-manager/dunst.nix

+27-2
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,44 @@
44
let
55
inherit (config.catppuccin) sources;
66

7-
cfg = config.services.dunst.catppuccin;
7+
cfg = config.catppuccin.dunst;
88
enable = cfg.enable && config.services.dunst.enable;
99
in
1010

1111
{
12-
options.services.dunst.catppuccin = catppuccinLib.mkCatppuccinOption { name = "dunst"; } // {
12+
options.catppuccin.dunst = catppuccinLib.mkCatppuccinOption { name = "dunst"; } // {
1313
prefix = lib.mkOption {
1414
type = lib.types.str;
1515
default = "00";
1616
description = "Prefix to use for the dunst drop-in file";
1717
};
1818
};
1919

20+
imports =
21+
(catppuccinLib.mkRenamedCatppuccinOpts {
22+
from = [
23+
"services"
24+
"dunst"
25+
"catppuccin"
26+
];
27+
to = "dunst";
28+
})
29+
++ [
30+
(lib.mkRenamedOptionModule
31+
[
32+
"services"
33+
"dunst"
34+
"catppuccin"
35+
"prefix"
36+
]
37+
[
38+
"catppuccin"
39+
"dunst"
40+
"prefix"
41+
]
42+
)
43+
];
44+
2045
# Dunst currently has no "include" functionality, but has "drop-ins"
2146
# Unfortunately, this may cause inconvenience as it overrides ~/.config/dunst/dunstrc
2247
# but it can be overridden by another drop-in.

modules/home-manager/fcitx5.nix

+43-15
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
let
55
inherit (config.catppuccin) sources;
66

7-
cfg = config.i18n.inputMethod.fcitx5.catppuccin;
7+
cfg = config.catppuccin.fcitx5;
88
enable = cfg.enable && config.i18n.inputMethod.enabled == "fcitx5";
99
in
1010

1111
{
12-
options.i18n.inputMethod.fcitx5.catppuccin =
12+
options.catppuccin.fcitx5 =
1313
catppuccinLib.mkCatppuccinOption {
1414
name = "Fcitx5";
1515
accentSupport = true;
@@ -23,22 +23,50 @@ in
2323
If this is disabled, you must manually set the theme (e.g. by using `fcitx5-configtool`).
2424
'';
2525
};
26-
};
2726

28-
config = lib.mkIf enable {
29-
xdg.dataFile = {
30-
"fcitx5/themes/catppuccin-${cfg.flavor}-${cfg.accent}" = {
31-
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}-${cfg.accent}";
32-
recursive = true;
33-
};
34-
};
27+
imports =
28+
(catppuccinLib.mkRenamedCatppuccinOpts {
29+
from = [
30+
"i18n"
31+
"inputMethod"
32+
"fcitx5"
33+
"catppuccin"
34+
];
35+
to = "fcitx5";
36+
accentSupport = true;
37+
})
38+
++ [
39+
(lib.mkRenamedOptionModule
40+
[
41+
"i18n"
42+
"inputMethod"
43+
"fcitx5"
44+
"catppuccin"
45+
"apply"
46+
]
47+
[
48+
"catppuccin"
49+
"fcitx5"
50+
"apply"
51+
]
52+
)
53+
];
54+
55+
config = lib.mkIf enable {
56+
xdg.dataFile = {
57+
"fcitx5/themes/catppuccin-${cfg.flavor}-${cfg.accent}" = {
58+
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}-${cfg.accent}";
59+
recursive = true;
60+
};
61+
};
3562

36-
xdg.configFile = {
37-
"fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply {
38-
text = lib.generators.toINIWithGlobalSection { } {
39-
globalSection.Theme = "catppuccin-${cfg.flavor}-${cfg.accent}";
63+
xdg.configFile = {
64+
"fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply {
65+
text = lib.generators.toINIWithGlobalSection { } {
66+
globalSection.Theme = "catppuccin-${cfg.flavor}-${cfg.accent}";
67+
};
68+
};
4069
};
4170
};
4271
};
43-
};
4472
}

modules/home-manager/fish.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,24 @@
44
let
55
inherit (config.catppuccin) sources;
66

7-
cfg = config.programs.fish.catppuccin;
7+
cfg = config.catppuccin.fish;
88
enable = cfg.enable && config.programs.fish.enable;
99

1010
themeName = "Catppuccin ${catppuccinLib.mkUpper cfg.flavor}";
1111
themePath = "/themes/${themeName}.theme";
1212
in
1313

1414
{
15-
options.programs.fish.catppuccin = catppuccinLib.mkCatppuccinOption { name = "fish"; };
15+
options.catppuccin.fish = catppuccinLib.mkCatppuccinOption { name = "fish"; };
16+
17+
imports = catppuccinLib.mkRenamedCatppuccinOpts {
18+
from = [
19+
"programs"
20+
"fish"
21+
"catppuccin"
22+
];
23+
to = "fish";
24+
};
1625

1726
config = lib.mkIf enable {
1827
xdg.configFile."fish${themePath}".source = "${sources.fish}${themePath}";

0 commit comments

Comments
 (0)