feat(mako): Catppuccin -> Rose Pine
This commit is contained in:
parent
bf5eb17672
commit
f8c7812f4f
2 changed files with 22 additions and 20 deletions
|
@ -184,13 +184,13 @@
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "GitHub",
|
"type": "GitHub",
|
||||||
"owner": "catppuccin",
|
"owner": "rose-pine",
|
||||||
"repo": "mako"
|
"repo": "mako"
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"revision": "92844f144e72f2dc8727879ec141ffdacf3ff6a1",
|
"revision": "07bc71ed12be3ce7d0b728eee58c5e183f78f40e",
|
||||||
"url": "https://github.com/catppuccin/mako/archive/92844f144e72f2dc8727879ec141ffdacf3ff6a1.tar.gz",
|
"url": "https://github.com/rose-pine/mako/archive/07bc71ed12be3ce7d0b728eee58c5e183f78f40e.tar.gz",
|
||||||
"hash": "0nz5x66bv0nhmgh2slw647j69x7pqcw0cyclkpv3bq6c5bw9j24f"
|
"hash": "0xxkj2x4nz6qkdjdfr5fddb24ab51519xnai63x62zlij0fzgdq0"
|
||||||
},
|
},
|
||||||
"micro": {
|
"micro": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
|
|
@ -3,31 +3,33 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
inherit (config.rose-pine) sources;
|
||||||
inherit (config.catppuccin) sources;
|
|
||||||
cfg = config.services.mako.catppuccin;
|
cfg = config.services.mako.rose-pine;
|
||||||
enable = cfg.enable && config.services.mako.enable;
|
enable = cfg.enable && config.services.mako.enable;
|
||||||
theme = lib.ctp.fromINI (
|
|
||||||
sources.mako + "/themes/catppuccin-${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}"
|
themeName =
|
||||||
);
|
if (cfg.flavor == "main")
|
||||||
|
then "rose-pine"
|
||||||
|
else "rose-pine-${cfg.flavor}";
|
||||||
|
theme = lib.rp.fromINI (sources.mako + "/theme/${themeName}.theme");
|
||||||
|
|
||||||
# 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;
|
||||||
in
|
in {
|
||||||
{
|
options.services.mako.rose-pine =
|
||||||
options.services.mako.catppuccin = lib.ctp.mkCatppuccinOpt { name = "mako"; } // {
|
lib.rp.mkRosePineOpt {name = "mako";};
|
||||||
accent = lib.ctp.mkAccentOpt "mako";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Will cause infinite recursion if config.services.mako is directly set as a whole
|
# Will cause infinite recursion if config.services.mako is directly set as a
|
||||||
|
# whole.
|
||||||
config.services.mako = lib.mkIf enable {
|
config.services.mako = lib.mkIf enable {
|
||||||
backgroundColor = theme.background-color;
|
backgroundColor = theme.background-color;
|
||||||
textColor = theme.text-color;
|
textColor = theme.text-color;
|
||||||
borderColor = theme.border-color;
|
borderColor = theme.border-color;
|
||||||
progressColor = theme.progress-color;
|
progressColor = theme.progress-color;
|
||||||
extraConfig = builtins.readFile (
|
extraConfig = builtins.readFile (
|
||||||
(pkgs.formats.ini { }).generate "mako-extra-config" extraConfigAttrs
|
(pkgs.formats.ini {}).generate "mako-extra-config" extraConfigAttrs
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue