From b9156bcace745c764d3a5578fbf5a765a2319474 Mon Sep 17 00:00:00 2001 From: Lichthagel Date: Fri, 19 Apr 2024 14:26:50 +0200 Subject: [PATCH] feat(home-manager): add support for waybar --- _sources/generated.json | 22 +++++++++++++++++++++- _sources/generated.nix | 12 ++++++++++++ modules/home-manager/waybar.nix | 18 ++++++++++++++++++ nvfetcher.toml | 4 ++++ test.nix | 1 + 5 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 modules/home-manager/waybar.nix diff --git a/_sources/generated.json b/_sources/generated.json index 332a3ac2..062dd99f 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -639,6 +639,26 @@ }, "version": "5ed4e8a6a20c928688da268dfcdf460ac9c3cb49" }, + "waybar": { + "cargoLocks": null, + "date": "2024-03-31", + "extract": null, + "name": "waybar", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "catppuccin", + "repo": "waybar", + "rev": "0830796af6aa64ce8bc7453d42876a628777ac68", + "sha256": "sha256-9lY+v1CTbpw2lREG/h65mLLw5KuT8OJdEPOb+NNC6Fo=", + "type": "github" + }, + "version": "0830796af6aa64ce8bc7453d42876a628777ac68" + }, "yazi": { "cargoLocks": null, "date": "2024-02-21", @@ -679,4 +699,4 @@ }, "version": "0adc53028d81bf047461bc61c43a484d11b15220" } -} \ No newline at end of file +} diff --git a/_sources/generated.nix b/_sources/generated.nix index b3cbcb42..93ef20b0 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -385,6 +385,18 @@ }; date = "2024-03-30"; }; + waybar = { + pname = "waybar"; + version = "0830796af6aa64ce8bc7453d42876a628777ac68"; + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "waybar"; + rev = "0830796af6aa64ce8bc7453d42876a628777ac68"; + fetchSubmodules = false; + sha256 = "sha256-9lY+v1CTbpw2lREG/h65mLLw5KuT8OJdEPOb+NNC6Fo="; + }; + date = "2024-03-31"; + }; yazi = { pname = "yazi"; version = "0846aed69b2a62d29c98e100af0cf55ca729723d"; diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix new file mode 100644 index 00000000..c58e9491 --- /dev/null +++ b/modules/home-manager/waybar.nix @@ -0,0 +1,18 @@ +{ config +, lib +, sources +, ... +}: +let + cfg = config.programs.waybar.catppuccin; + enable = cfg.enable && config.programs.waybar.enable; +in +{ + options.programs.waybar.catppuccin = lib.ctp.mkCatppuccinOpt "waybar"; + + config.programs.waybar = lib.mkIf enable { + style = lib.mkBefore '' + @import "${sources.waybar}/themes/${cfg.flavour}.css"; + ''; + }; +} diff --git a/nvfetcher.toml b/nvfetcher.toml index 6d05c37c..8ff56ae0 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -126,6 +126,10 @@ fetch.github = "catppuccin/swaylock" src.git = "https://github.com/catppuccin/tmux.git" fetch.github = "catppuccin/tmux" +[waybar] +src.git = "https://github.com/catppuccin/waybar.git" +fetch.github = "catppuccin/waybar" + [yazi] src.git = "https://github.com/catppuccin/yazi.git" fetch.github = "catppuccin/yazi" diff --git a/test.nix b/test.nix index 67ac478f..8a0223c1 100644 --- a/test.nix +++ b/test.nix @@ -82,6 +82,7 @@ in starship = enable; swaylock = enable; tmux = enable; + waybar = enable; yazi = enable; zathura = enable; };