Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mako): add accent color support #323

Merged
merged 4 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .sources/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@
"repo": "mako"
},
"branch": "main",
"revision": "33cb59ce8483725e2dd3e818aecbf0bab259bde8",
"url": "https://github.com/catppuccin/mako/archive/33cb59ce8483725e2dd3e818aecbf0bab259bde8.tar.gz",
"hash": "1hy1k5dm8q75i9bqffmg8z4k0qkg9291k73vhpp0msn7bivb1aba"
"revision": "92844f144e72f2dc8727879ec141ffdacf3ff6a1",
"url": "https://github.com/catppuccin/mako/archive/92844f144e72f2dc8727879ec141ffdacf3ff6a1.tar.gz",
"hash": "0nz5x66bv0nhmgh2slw647j69x7pqcw0cyclkpv3bq6c5bw9j24f"
},
"micro": {
"type": "Git",
Expand Down Expand Up @@ -482,4 +482,4 @@
}
},
"version": 3
}
}
6 changes: 4 additions & 2 deletions modules/home-manager/mako.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ let
inherit (config.catppuccin) sources;
cfg = config.services.mako.catppuccin;
enable = cfg.enable && config.services.mako.enable;
theme = lib.ctp.fromINI (sources.mako + "/themes/${cfg.flavor}");
theme = lib.ctp.fromINI (sources.mako + "/themes/catppuccin-${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}");

# Settings that need to be extracted and put in extraConfig
extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme;
in
{
options.services.mako.catppuccin = lib.ctp.mkCatppuccinOpt { name = "mako"; };
options.services.mako.catppuccin = lib.ctp.mkCatppuccinOpt { name = "mako"; } // {
accent = lib.ctp.mkAccentOpt "mako";
};

# Will cause infinite recursion if config.services.mako is directly set as a whole
config.services.mako = lib.mkIf enable {
Expand Down