From 7e23de352f519067ea88db869e9aa14222290a73 Mon Sep 17 00:00:00 2001 From: Anomalocaridid <29845794+Anomalocaridid@users.noreply.github.com> Date: Tue, 6 Aug 2024 21:21:08 -0400 Subject: [PATCH] feat(home-manager): add support for fuzzel (#75) --- .sources/sources.json | 12 ++++++++++++ modules/home-manager/all-modules.nix | 1 + modules/home-manager/fuzzel.nix | 14 ++++++++++++++ tests/darwin.nix | 1 + tests/home.nix | 1 + 5 files changed, 29 insertions(+) create mode 100644 modules/home-manager/fuzzel.nix diff --git a/.sources/sources.json b/.sources/sources.json index 18ed6fd6..ca96b107 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -120,6 +120,18 @@ "url": "https://github.com/catppuccin/foot/archive/17e2bdc8a8d854e8d390919579f87ab7d5f86e38.tar.gz", "hash": "145icc622jf5j9sb4d5phclh47s6n6zi9c906p3n935q2yycg7rg" }, + "fuzzel": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "fuzzel" + }, + "branch": "main", + "revision": "125dc68ba79ddfe71e59412257698418c4f05218", + "url": "https://github.com/catppuccin/fuzzel/archive/125dc68ba79ddfe71e59412257698418c4f05218.tar.gz", + "hash": "12vdwfm17f40c0pv8i36kfmpsx5jnxbdjyz0jajcfx419dl3mpms" + }, "gh-dash": { "type": "Git", "repository": { diff --git a/modules/home-manager/all-modules.nix b/modules/home-manager/all-modules.nix index 8f07e9b7..32d8a3db 100644 --- a/modules/home-manager/all-modules.nix +++ b/modules/home-manager/all-modules.nix @@ -10,6 +10,7 @@ ./fcitx5.nix ./fish.nix ./foot.nix + ./fuzzel.nix ./fzf.nix ./gh-dash.nix ./gitui.nix diff --git a/modules/home-manager/fuzzel.nix b/modules/home-manager/fuzzel.nix new file mode 100644 index 00000000..9648a89f --- /dev/null +++ b/modules/home-manager/fuzzel.nix @@ -0,0 +1,14 @@ +{ config, lib, ... }: +let + inherit (config.catppuccin) sources; + cfg = config.programs.fuzzel.catppuccin; +in +{ + options.programs.fuzzel.catppuccin = lib.ctp.mkCatppuccinOpt { name = "fuzzel"; } // { + accent = lib.ctp.mkAccentOpt "fuzzel"; + }; + + config = lib.mkIf cfg.enable { + programs.fuzzel.settings.main.include = sources.fuzzel + "/themes/${cfg.flavor}/${cfg.accent}.ini"; + }; +} diff --git a/tests/darwin.nix b/tests/darwin.nix index 07a885bb..5dabcc47 100644 --- a/tests/darwin.nix +++ b/tests/darwin.nix @@ -18,6 +18,7 @@ programs = { cava.enable = lib.mkForce false; # NOTE: this may actually work on darwin, but the package is currently not supported foot.enable = lib.mkForce false; + fuzzel.enable = lib.mkForce false; imv.enable = lib.mkForce false; mpv.enable = lib.mkForce false; # NOTE: same as cava, but `mpv` fails to build currently rofi.enable = lib.mkForce false; diff --git a/tests/home.nix b/tests/home.nix index 72f2d871..011b715c 100644 --- a/tests/home.nix +++ b/tests/home.nix @@ -24,6 +24,7 @@ cava.enable = true; fish.enable = true; foot.enable = true; + fuzzel.enable = true; fzf.enable = true; gh-dash.enable = true; git = {