feat(modules)!: flavour -> flavor (#190)
This commit is contained in:
parent
ac87622fa4
commit
fea5242c0e
48 changed files with 101 additions and 111 deletions
|
@ -3,9 +3,9 @@
|
||||||
## Adding a port
|
## Adding a port
|
||||||
|
|
||||||
Create a file in `modules/<module>/` with the name of the port. All ports should have
|
Create a file in `modules/<module>/` with the name of the port. All ports should have
|
||||||
the `catppuccin.enable` and `catppuccin.flavour` options, and optionally the
|
the `catppuccin.enable` and `catppuccin.flavor` options, and optionally the
|
||||||
`catppuccin.accent` option. `catppuccin.flavour` and `catppuccin.accent` should
|
`catppuccin.accent` option. `catppuccin.flavor` and `catppuccin.accent` should
|
||||||
default to `config.catppuccin.flavour` and `config.catppuccin.accent`, respectively.
|
default to `config.catppuccin.flavor` and `config.catppuccin.accent`, respectively.
|
||||||
|
|
||||||
[npins](https://github.com/andir/npins) is used to track our upstream
|
[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.
|
sources to use in modules. This allows us to easily access and auto-update all themes.
|
||||||
|
|
|
@ -133,11 +133,11 @@ For [standalone installations](https://nix-community.github.io/home-manager/inde
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
2. Choose your desired flavour with `catppuccin.flavour`
|
2. Choose your desired flavor with `catppuccin.flavor`
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
catppuccin.flavour = "mocha";
|
catppuccin.flavor = "mocha";
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) ctp;
|
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.programs.alacritty.catppuccin;
|
cfg = config.programs.alacritty.catppuccin;
|
||||||
enable = cfg.enable && config.programs.alacritty.enable;
|
enable = cfg.enable && config.programs.alacritty.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.alacritty.catppuccin = ctp.mkCatppuccinOpt "alacritty";
|
options.programs.alacritty.catppuccin = lib.ctp.mkCatppuccinOpt "alacritty";
|
||||||
|
|
||||||
config = lib.mkIf enable {
|
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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.programs.bat.catppuccin;
|
cfg = config.programs.bat.catppuccin;
|
||||||
enable = cfg.enable && config.programs.bat.enable;
|
enable = cfg.enable && config.programs.bat.enable;
|
||||||
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}";
|
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt "bat";
|
options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt "bat";
|
||||||
|
|
|
@ -8,10 +8,8 @@ in
|
||||||
options.programs.bottom.catppuccin = lib.ctp.mkCatppuccinOpt "bottom";
|
options.programs.bottom.catppuccin = lib.ctp.mkCatppuccinOpt "bottom";
|
||||||
|
|
||||||
config = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
|
|
||||||
programs.bottom = {
|
programs.bottom = {
|
||||||
|
settings = lib.importTOML "${sources.bottom}/themes/${cfg.flavor}.toml";
|
||||||
settings = builtins.fromTOML (builtins.readFile "${sources.bottom}/themes/${cfg.flavour}.toml");
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
cfg = config.programs.btop.catppuccin;
|
cfg = config.programs.btop.catppuccin;
|
||||||
enable = cfg.enable && config.programs.btop.enable;
|
enable = cfg.enable && config.programs.btop.enable;
|
||||||
|
|
||||||
themeFile = "catppuccin_${cfg.flavour}.theme";
|
themeFile = "catppuccin_${cfg.flavor}.theme";
|
||||||
themePath = "/themes/${themeFile}";
|
themePath = "/themes/${themeFile}";
|
||||||
theme = sources.btop + themePath;
|
theme = sources.btop + themePath;
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) ctp;
|
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
|
|
||||||
cfg = config.programs.cava.catppuccin;
|
cfg = config.programs.cava.catppuccin;
|
||||||
enable = cfg.enable && config.programs.cava.enable;
|
enable = cfg.enable && config.programs.cava.enable;
|
||||||
in
|
in
|
||||||
|
@ -10,6 +8,6 @@ in
|
||||||
options.programs.cava.catppuccin = lib.ctp.mkCatppuccinOpt "cava";
|
options.programs.cava.catppuccin = lib.ctp.mkCatppuccinOpt "cava";
|
||||||
|
|
||||||
config.programs.cava = lib.mkIf enable {
|
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");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ in
|
||||||
config = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
includes = [ { path = "${sources.delta}/catppuccin.gitconfig"; } ];
|
includes = [ { path = "${sources.delta}/catppuccin.gitconfig"; } ];
|
||||||
delta.options.features = "catppuccin-${cfg.flavour}";
|
delta.options.features = "catppuccin-${cfg.flavor}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
|
|
||||||
cfg = config.services.dunst.catppuccin;
|
cfg = config.services.dunst.catppuccin;
|
||||||
enable = cfg.enable && config.services.dunst.enable;
|
enable = cfg.enable && config.services.dunst.enable;
|
||||||
in
|
in
|
||||||
|
@ -9,6 +8,6 @@ in
|
||||||
options.services.dunst.catppuccin = lib.ctp.mkCatppuccinOpt "dunst";
|
options.services.dunst.catppuccin = lib.ctp.mkCatppuccinOpt "dunst";
|
||||||
|
|
||||||
config.services.dunst = lib.mkIf enable {
|
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");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,14 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavour}" = {
|
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavor}" = {
|
||||||
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavour}";
|
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply {
|
xdg.configFile."fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply {
|
||||||
text = lib.generators.toINIWithGlobalSection { } {
|
text = lib.generators.toINIWithGlobalSection { } {
|
||||||
globalSection.Theme = "catppuccin-${cfg.flavour}";
|
globalSection.Theme = "catppuccin-${cfg.flavor}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
cfg = config.programs.fish.catppuccin;
|
cfg = config.programs.fish.catppuccin;
|
||||||
enable = cfg.enable && config.programs.fish.enable;
|
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";
|
themePath = "/themes/${themeName}.theme";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
|
|
||||||
cfg = config.programs.foot.catppuccin;
|
cfg = config.programs.foot.catppuccin;
|
||||||
enable = cfg.enable && config.programs.foot.enable;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.programs.foot.catppuccin = lib.ctp.mkCatppuccinOpt "foot";
|
options.programs.foot.catppuccin = lib.ctp.mkCatppuccinOpt "foot";
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
|
|
||||||
cfg = config.programs.fzf.catppuccin;
|
cfg = config.programs.fzf.catppuccin;
|
||||||
enable = cfg.enable && config.programs.fzf.enable;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.programs.fzf.catppuccin = lib.ctp.mkCatppuccinOpt "fzf";
|
options.programs.fzf.catppuccin = lib.ctp.mkCatppuccinOpt "fzf";
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.programs.gh-dash.catppuccin;
|
cfg = config.programs.gh-dash.catppuccin;
|
||||||
enable = cfg.enable && config.programs.gh-dash.enable;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.programs.gh-dash.catppuccin = lib.ctp.mkCatppuccinOpt "gh-dash" // {
|
options.programs.gh-dash.catppuccin = lib.ctp.mkCatppuccinOpt "gh-dash" // {
|
||||||
|
|
|
@ -10,8 +10,8 @@ in
|
||||||
|
|
||||||
config = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
programs.gitui.theme = builtins.path {
|
programs.gitui.theme = builtins.path {
|
||||||
name = "${cfg.flavour}.ron";
|
name = "${cfg.flavor}.ron";
|
||||||
path = "${sources.gitui}/theme/${cfg.flavour}.ron";
|
path = "${sources.gitui}/theme/${cfg.flavor}.ron";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ in
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.sessionVariables = lib.mkIf enable {
|
home.sessionVariables = lib.mkIf enable {
|
||||||
GLAMOUR_STYLE = "${sources.glamour}/themes/catppuccin-${cfg.flavour}.json";
|
GLAMOUR_STYLE = "${sources.glamour}/themes/catppuccin-${cfg.flavor}.json";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
options.catppuccin = {
|
options.catppuccin = {
|
||||||
enable = lib.mkEnableOption "Catppuccin globally";
|
enable = lib.mkEnableOption "Catppuccin globally";
|
||||||
|
|
||||||
flavour = lib.mkOption {
|
flavor = lib.mkOption {
|
||||||
type = lib.ctp.types.flavourOption;
|
type = lib.ctp.types.flavorOption;
|
||||||
default = "mocha";
|
default = "mocha";
|
||||||
description = "Global Catppuccin flavour";
|
description = "Global Catppuccin flavor";
|
||||||
};
|
};
|
||||||
|
|
||||||
accent = lib.mkOption {
|
accent = lib.mkOption {
|
||||||
|
|
|
@ -58,43 +58,40 @@ in
|
||||||
gtk = {
|
gtk = {
|
||||||
theme =
|
theme =
|
||||||
let
|
let
|
||||||
flavourUpper = ctp.mkUpper cfg.flavour;
|
flavorUpper = ctp.mkUpper cfg.flavor;
|
||||||
accentUpper = ctp.mkUpper cfg.accent;
|
accentUpper = ctp.mkUpper cfg.accent;
|
||||||
sizeUpper = ctp.mkUpper cfg.size;
|
sizeUpper = ctp.mkUpper cfg.size;
|
||||||
|
|
||||||
# use the light gtk theme for latte
|
# 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
|
in
|
||||||
{
|
{
|
||||||
name = "Catppuccin-${flavourUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}";
|
name = "Catppuccin-${flavorUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}";
|
||||||
package = pkgs.catppuccin-gtk.override {
|
package = pkgs.catppuccin-gtk.override {
|
||||||
inherit (cfg) size tweaks;
|
inherit (cfg) size tweaks;
|
||||||
accents = [ cfg.accent ];
|
accents = [ cfg.accent ];
|
||||||
variant = cfg.flavour;
|
variant = cfg.flavor;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cursorTheme =
|
cursorTheme =
|
||||||
let
|
let
|
||||||
flavourUpper = ctp.mkUpper cfg.cursor.flavour;
|
flavorUpper = ctp.mkUpper cfg.cursor.flavor;
|
||||||
accentUpper = ctp.mkUpper cfg.cursor.accent;
|
accentUpper = ctp.mkUpper cfg.cursor.accent;
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.cursor.enable {
|
lib.mkIf cfg.cursor.enable {
|
||||||
name = "Catppuccin-${flavourUpper}-${accentUpper}-Cursors";
|
name = "Catppuccin-${flavorUpper}-${accentUpper}-Cursors";
|
||||||
package = pkgs.catppuccin-cursors.${cfg.cursor.flavour + accentUpper};
|
package = pkgs.catppuccin-cursors.${cfg.cursor.flavor + accentUpper};
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme =
|
iconTheme =
|
||||||
let
|
let
|
||||||
# use the light icon theme for latte
|
# 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
|
in
|
||||||
lib.mkIf cfg.icon.enable {
|
lib.mkIf cfg.icon.enable {
|
||||||
name = "Papirus-${polarity}";
|
name = "Papirus-${polarity}";
|
||||||
package = pkgs.catppuccin-papirus-folders.override {
|
package = pkgs.catppuccin-papirus-folders.override { inherit (cfg.icon) accent flavor; };
|
||||||
flavor = cfg.icon.flavour;
|
|
||||||
inherit (cfg.icon) accent;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -119,7 +116,7 @@ in
|
||||||
inherit (config.gtk.theme) name;
|
inherit (config.gtk.theme) name;
|
||||||
};
|
};
|
||||||
"org/gnome/desktop/interface" = {
|
"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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,25 +5,22 @@ let
|
||||||
enable = cfg.enable && config.programs.helix.enable;
|
enable = cfg.enable && config.programs.helix.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.helix.catppuccin =
|
options.programs.helix.catppuccin = lib.ctp.mkCatppuccinOpt "helix" // {
|
||||||
with lib;
|
useItalics = lib.mkEnableOption "Italics in Catppuccin theme for Helix";
|
||||||
ctp.mkCatppuccinOpt "helix"
|
};
|
||||||
// {
|
|
||||||
useItalics = mkEnableOption "Italics in Catppuccin theme for Helix";
|
|
||||||
};
|
|
||||||
|
|
||||||
config.programs.helix =
|
config = lib.mkIf enable {
|
||||||
let
|
programs.helix =
|
||||||
subdir = if cfg.useItalics then "default" else "no_italics";
|
let
|
||||||
in
|
subdir = if cfg.useItalics then "default" else "no_italics";
|
||||||
lib.mkIf enable {
|
in
|
||||||
settings = {
|
{
|
||||||
theme = "catppuccin-${cfg.flavour}";
|
settings = {
|
||||||
editor.color-modes = lib.mkDefault true;
|
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"
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ in
|
||||||
|
|
||||||
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
|
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
|
||||||
source = [
|
source = [
|
||||||
"${sources.hyprland}/themes/${cfg.flavour}.conf"
|
"${sources.hyprland}/themes/${cfg.flavor}.conf"
|
||||||
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
|
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
|
||||||
$accent=''$${cfg.accent}
|
$accent=''$${cfg.accent}
|
||||||
$accentAlpha=''$${cfg.accent}Alpha
|
$accentAlpha=''$${cfg.accent}Alpha
|
||||||
|
|
|
@ -8,6 +8,6 @@ in
|
||||||
options.programs.imv.catppuccin = lib.ctp.mkCatppuccinOpt "imv";
|
options.programs.imv.catppuccin = lib.ctp.mkCatppuccinOpt "imv";
|
||||||
|
|
||||||
config.programs.imv.settings = lib.mkIf enable (
|
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")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,14 @@ let
|
||||||
cfg = config.programs.k9s.catppuccin;
|
cfg = config.programs.k9s.catppuccin;
|
||||||
enable = cfg.enable && config.programs.k9s.enable;
|
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";
|
themeFile = "${themeName}.yaml";
|
||||||
themePath = "/skins/${themeFile}";
|
themePath = "/skins/${themeFile}";
|
||||||
theme = sources.k9s + "/dist/${themeFile}";
|
theme = sources.k9s + "/dist/${themeFile}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.k9s.catppuccin = lib.ctp.mkCatppuccinOpt "k9s" // {
|
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 {
|
config = lib.mkIf enable {
|
||||||
|
|
|
@ -7,5 +7,5 @@ in
|
||||||
{
|
{
|
||||||
options.programs.kitty.catppuccin = ctp.mkCatppuccinOpt "kitty";
|
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}"; };
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
cfg = config.programs.lazygit.catppuccin;
|
cfg = config.programs.lazygit.catppuccin;
|
||||||
enable = cfg.enable && config.programs.lazygit.enable;
|
enable = cfg.enable && config.programs.lazygit.enable;
|
||||||
|
|
||||||
themePath = "/${cfg.flavour}/${cfg.accent}.yml";
|
themePath = "/${cfg.flavor}/${cfg.accent}.yml";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.lazygit.catppuccin = lib.ctp.mkCatppuccinOpt "lazygit" // {
|
options.programs.lazygit.catppuccin = lib.ctp.mkCatppuccinOpt "lazygit" // {
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.services.mako.catppuccin;
|
cfg = config.services.mako.catppuccin;
|
||||||
enable = cfg.enable && config.services.mako.enable;
|
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
|
# Settings that need to be extracted and put in extraConfig
|
||||||
extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme;
|
extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme;
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
cfg = config.programs.micro.catppuccin;
|
cfg = config.programs.micro.catppuccin;
|
||||||
enable = cfg.enable && config.programs.micro.enable;
|
enable = cfg.enable && config.programs.micro.enable;
|
||||||
|
|
||||||
themePath = "catppuccin-${cfg.flavour}.micro";
|
themePath = "catppuccin-${cfg.flavor}.micro";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.micro.catppuccin = lib.ctp.mkCatppuccinOpt "micro";
|
options.programs.micro.catppuccin = lib.ctp.mkCatppuccinOpt "micro";
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.programs.mpv.catppuccin;
|
cfg = config.programs.mpv.catppuccin;
|
||||||
enable = cfg.enable && config.programs.mpv.enable;
|
enable = cfg.enable && config.programs.mpv.enable;
|
||||||
themeDir = sources.mpv + /themes/${cfg.flavour}/${cfg.accent};
|
themeDir = sources.mpv + "/themes/${cfg.flavor}/${cfg.accent}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.mpv.catppuccin = lib.ctp.mkCatppuccinOpt "mpv" // {
|
options.programs.mpv.catppuccin = lib.ctp.mkCatppuccinOpt "mpv" // {
|
||||||
|
|
|
@ -23,7 +23,7 @@ in
|
||||||
|
|
||||||
require("catppuccin").setup({
|
require("catppuccin").setup({
|
||||||
compile_path = compile_path,
|
compile_path = compile_path,
|
||||||
flavour = "${cfg.flavour}",
|
flavour = "${cfg.flavor}",
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_command("colorscheme catppuccin")
|
vim.api.nvim_command("colorscheme catppuccin")
|
||||||
|
|
|
@ -8,6 +8,6 @@ in
|
||||||
options.services.polybar.catppuccin = lib.ctp.mkCatppuccinOpt "polybar";
|
options.services.polybar.catppuccin = lib.ctp.mkCatppuccinOpt "polybar";
|
||||||
|
|
||||||
config.services.polybar.extraConfig = lib.mkIf enable (
|
config.services.polybar.extraConfig = lib.mkIf enable (
|
||||||
builtins.readFile "${sources.polybar}/themes/${cfg.flavour}.ini"
|
builtins.readFile "${sources.polybar}/themes/${cfg.flavor}.ini"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,6 @@ in
|
||||||
options.programs.rio.catppuccin = ctp.mkCatppuccinOpt "rio";
|
options.programs.rio.catppuccin = ctp.mkCatppuccinOpt "rio";
|
||||||
|
|
||||||
config = lib.mkIf enable {
|
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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,8 @@ in
|
||||||
config.programs.rofi = lib.mkIf enable {
|
config.programs.rofi = lib.mkIf enable {
|
||||||
theme = {
|
theme = {
|
||||||
"@theme" = builtins.path {
|
"@theme" = builtins.path {
|
||||||
name = "catppuccin-${cfg.flavour}.rasi";
|
name = "catppuccin-${cfg.flavor}.rasi";
|
||||||
path = "${sources.rofi}/basic/.local/share/rofi/themes/catppuccin-${cfg.flavour}.rasi";
|
path = "${sources.rofi}/basic/.local/share/rofi/themes/catppuccin-${cfg.flavor}.rasi";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.programs.skim.catppuccin;
|
cfg = config.programs.skim.catppuccin;
|
||||||
enable = cfg.enable && config.programs.skim.enable;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.programs.skim.catppuccin = lib.ctp.mkCatppuccinOpt "skim";
|
options.programs.skim.catppuccin = lib.ctp.mkCatppuccinOpt "skim";
|
||||||
|
|
|
@ -10,8 +10,8 @@ in
|
||||||
config.programs.starship.settings = lib.mkIf enable (
|
config.programs.starship.settings = lib.mkIf enable (
|
||||||
{
|
{
|
||||||
format = lib.mkDefault "$all";
|
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"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,14 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.wayland.windowManager.sway.catppuccin;
|
cfg = config.wayland.windowManager.sway.catppuccin;
|
||||||
enable = cfg.enable && config.wayland.windowManager.sway.enable;
|
enable = cfg.enable && config.wayland.windowManager.sway.enable;
|
||||||
theme = "${sources.sway}/themes/catppuccin-${cfg.flavour}";
|
theme = "${sources.sway}/themes/catppuccin-${cfg.flavor}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.wayland.windowManager.sway.catppuccin = lib.ctp.mkCatppuccinOpt "sway";
|
options.wayland.windowManager.sway.catppuccin = lib.ctp.mkCatppuccinOpt "sway";
|
||||||
|
|
||||||
config.wayland.windowManager.sway.extraConfigEarly = lib.mkIf enable ''
|
config = lib.mkIf enable {
|
||||||
include ${theme}
|
wayland.windowManager.sway.extraConfigEarly = ''
|
||||||
'';
|
include ${theme}
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options.programs.swaylock.catppuccin = lib.ctp.mkCatppuccinOpt "swaylock";
|
options.programs.swaylock.catppuccin = lib.ctp.mkCatppuccinOpt "swaylock";
|
||||||
|
|
||||||
config.programs.swaylock.settings = lib.mkIf enable (
|
config = lib.mkIf enable {
|
||||||
lib.ctp.fromINI (sources.swaylock + /themes/${cfg.flavour}.conf)
|
programs.swaylock.settings = lib.ctp.fromINI (sources.swaylock + "/themes/${cfg.flavor}.conf");
|
||||||
);
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ in
|
||||||
inherit plugin;
|
inherit plugin;
|
||||||
extraConfig = concatStrings [
|
extraConfig = concatStrings [
|
||||||
''
|
''
|
||||||
set -g @catppuccin_flavour '${cfg.flavour}'
|
set -g @catppuccin_flavour '${cfg.flavor}'
|
||||||
''
|
''
|
||||||
cfg.extraConfig
|
cfg.extraConfig
|
||||||
];
|
];
|
||||||
|
|
|
@ -14,6 +14,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config.programs.tofi = lib.mkIf enable {
|
config.programs.tofi = lib.mkIf enable {
|
||||||
settings = lib.ctp.fromINI (sources.tofi + /catppuccin-${cfg.flavour});
|
settings = lib.ctp.fromINI (sources.tofi + "/catppuccin-${cfg.flavor}");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.programs.waybar.catppuccin;
|
cfg = config.programs.waybar.catppuccin;
|
||||||
enable = cfg.enable && config.programs.waybar.enable;
|
enable = cfg.enable && config.programs.waybar.enable;
|
||||||
styleFile = "${sources.waybar}/themes/${cfg.flavour}.css";
|
styleFile = "${sources.waybar}/themes/${cfg.flavor}.css";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.waybar.catppuccin = (lib.ctp.mkCatppuccinOpt "waybar") // {
|
options.programs.waybar.catppuccin = (lib.ctp.mkCatppuccinOpt "waybar") // {
|
||||||
|
|
|
@ -9,7 +9,7 @@ in
|
||||||
options.programs.yazi.catppuccin = lib.ctp.mkCatppuccinOpt "yazi";
|
options.programs.yazi.catppuccin = lib.ctp.mkCatppuccinOpt "yazi";
|
||||||
|
|
||||||
config = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
programs.yazi.theme = lib.importTOML "${sources.yazi}/themes/${cfg.flavour}.toml";
|
programs.yazi.theme = lib.importTOML "${sources.yazi}/themes/${cfg.flavor}.toml";
|
||||||
xdg.configFile."yazi/Catppuccin-${cfg.flavour}.tmTheme".source = "${sources.bat}/themes/Catppuccin ${lib.ctp.mkUpper cfg.flavour}.tmTheme";
|
xdg.configFile."yazi/Catppuccin-${cfg.flavor}.tmTheme".source = "${sources.bat}/themes/Catppuccin ${lib.ctp.mkUpper cfg.flavor}.tmTheme";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.programs.zathura.catppuccin;
|
cfg = config.programs.zathura.catppuccin;
|
||||||
enable = cfg.enable && config.programs.zathura.enable;
|
enable = cfg.enable && config.programs.zathura.enable;
|
||||||
themeFile = sources.zathura + /src/catppuccin-${cfg.flavour};
|
themeFile = sources.zathura + "/src/catppuccin-${cfg.flavor}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.zathura.catppuccin = lib.ctp.mkCatppuccinOpt "zathura";
|
options.programs.zathura.catppuccin = lib.ctp.mkCatppuccinOpt "zathura";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
let
|
let
|
||||||
cfg = config.programs.zellij.catppuccin;
|
cfg = config.programs.zellij.catppuccin;
|
||||||
enable = cfg.enable && config.programs.zellij.enable;
|
enable = cfg.enable && config.programs.zellij.enable;
|
||||||
themeName = "catppuccin-${cfg.flavour}";
|
themeName = "catppuccin-${cfg.flavor}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.zellij.catppuccin = lib.ctp.mkCatppuccinOpt "zellij";
|
options.programs.zellij.catppuccin = lib.ctp.mkCatppuccinOpt "zellij";
|
||||||
|
|
|
@ -10,7 +10,7 @@ in
|
||||||
|
|
||||||
config.programs.zsh = lib.mkIf enable {
|
config.programs.zsh = lib.mkIf enable {
|
||||||
initExtra = lib.mkBefore ''
|
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'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
# string -> type -> string -> a -> a
|
# string -> type -> string -> a -> a
|
||||||
# this is an internal function and shouldn't be
|
# this is an internal function and shouldn't be
|
||||||
# used unless you know what you're doing. it takes
|
# 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
|
# or accent), the type of the property, the name of
|
||||||
# the module, followed by local config attrset
|
# the module, followed by local config attrset
|
||||||
mkBasicOpt =
|
mkBasicOpt =
|
||||||
|
@ -24,13 +24,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# string -> a -> a
|
# 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,
|
# the first string should be the name of the module,
|
||||||
# followed by the local config attrset
|
# followed by the local config attrset
|
||||||
mkFlavourOpt = ctp.mkBasicOpt "flavour" ctp.types.flavourOption;
|
mkFlavourOpt = ctp.mkBasicOpt "flavor" ctp.types.flavorOption;
|
||||||
|
|
||||||
types = {
|
types = {
|
||||||
flavourOption = lib.types.enum [
|
flavorOption = lib.types.enum [
|
||||||
"latte"
|
"latte"
|
||||||
"frappe"
|
"frappe"
|
||||||
"macchiato"
|
"macchiato"
|
||||||
|
@ -107,14 +107,14 @@ in
|
||||||
|
|
||||||
# string -> a -> a
|
# string -> a -> a
|
||||||
# this creates a basic attrset only containing an
|
# 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
|
# be the name of the module, followed by the local config
|
||||||
# attrset
|
# attrset
|
||||||
mkCatppuccinOpt = name: {
|
mkCatppuccinOpt = name: {
|
||||||
enable = lib.mkEnableOption "Catppuccin theme" // {
|
enable = lib.mkEnableOption "Catppuccin theme" // {
|
||||||
default = config.catppuccin.enable;
|
default = config.catppuccin.enable;
|
||||||
};
|
};
|
||||||
flavour = ctp.mkFlavourOpt name;
|
flavor = ctp.mkFlavourOpt name;
|
||||||
};
|
};
|
||||||
|
|
||||||
# string -> a -> a
|
# string -> a -> a
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.console.catppuccin;
|
cfg = config.console.catppuccin;
|
||||||
enable = cfg.enable && config.console.enable;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.console.catppuccin = lib.ctp.mkCatppuccinOpt "console";
|
options.console.catppuccin = lib.ctp.mkCatppuccinOpt "console";
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
options.catppuccin = {
|
options.catppuccin = {
|
||||||
enable = lib.mkEnableOption "Catppuccin globally";
|
enable = lib.mkEnableOption "Catppuccin globally";
|
||||||
|
|
||||||
flavour = lib.mkOption {
|
flavor = lib.mkOption {
|
||||||
type = lib.ctp.types.flavourOption;
|
type = lib.ctp.types.flavorOption;
|
||||||
default = "mocha";
|
default = "mocha";
|
||||||
description = "Global Catppuccin flavour";
|
description = "Global Catppuccin flavor";
|
||||||
};
|
};
|
||||||
|
|
||||||
accent = lib.mkOption {
|
accent = lib.mkOption {
|
||||||
|
|
|
@ -12,7 +12,7 @@ let
|
||||||
# TODO @getchoo: upstream this in nixpkgs maybe? idk if they have grub themes
|
# TODO @getchoo: upstream this in nixpkgs maybe? idk if they have grub themes
|
||||||
theme = pkgs.runCommand "catppuccin-grub-theme" { } ''
|
theme = pkgs.runCommand "catppuccin-grub-theme" { } ''
|
||||||
mkdir -p "$out"
|
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
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@ in
|
||||||
options.boot.plymouth.catppuccin = ctp.mkCatppuccinOpt "plymouth";
|
options.boot.plymouth.catppuccin = ctp.mkCatppuccinOpt "plymouth";
|
||||||
|
|
||||||
config.boot.plymouth = mkIf enable {
|
config.boot.plymouth = mkIf enable {
|
||||||
theme = "catppuccin-${cfg.flavour}";
|
theme = "catppuccin-${cfg.flavor}";
|
||||||
themePackages = [ (pkgs.catppuccin-plymouth.override { variant = cfg.flavour; }) ];
|
themePackages = [ (pkgs.catppuccin-plymouth.override { variant = cfg.flavor; }) ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ in
|
||||||
mkIf enable {
|
mkIf enable {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.catppuccin-sddm.override {
|
(pkgs.catppuccin-sddm.override {
|
||||||
flavor = cfg.flavour;
|
|
||||||
inherit (cfg)
|
inherit (cfg)
|
||||||
|
flavor
|
||||||
font
|
font
|
||||||
fontSize
|
fontSize
|
||||||
background
|
background
|
||||||
|
@ -63,6 +63,6 @@ in
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
// mkIf (enable && versionAtLeast ctp.getModuleRelease minVersion) {
|
// mkIf (enable && versionAtLeast ctp.getModuleRelease minVersion) {
|
||||||
services.displayManager.sddm.theme = "catppuccin-${cfg.flavour}";
|
services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue