diff --git a/.sources/sources.json b/.sources/sources.json index 686aa43..6452bf5 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -352,13 +352,13 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "catppuccin", + "owner": "rose-pine", "repo": "waybar" }, "branch": "main", - "revision": "ee8ed32b4f63e9c417249c109818dcc05a2e25da", - "url": "https://github.com/catppuccin/waybar/archive/ee8ed32b4f63e9c417249c109818dcc05a2e25da.tar.gz", - "hash": "0q4mzqx3w6cywfifs7ij8qzhzvj59dfdzpvqx76vpnhd2zm35bfd" + "revision": "1b118bd60d1c5778dc8a82b919069eeb8a834604", + "url": "https://github.com/rose-pine/waybar/archive/1b118bd60d1c5778dc8a82b919069eeb8a834604.tar.gz", + "hash": "0yl8yjcdkq9442g31zl9ckkh99p9hnmq60ap3f91q7bwx5x5rg66" }, "yazi": { "type": "Git", @@ -398,4 +398,4 @@ } }, "version": 3 -} +} \ No newline at end of file diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix index df54cbb..9e400c9 100644 --- a/modules/home-manager/waybar.nix +++ b/modules/home-manager/waybar.nix @@ -1,26 +1,36 @@ -{ config, lib, ... }: -let - inherit (config.catppuccin) sources; - cfg = config.programs.waybar.catppuccin; - enable = cfg.enable && config.programs.waybar.enable; - styleFile = "${sources.waybar}/themes/${cfg.flavor}.css"; -in { - options.programs.waybar.catppuccin = lib.ctp.mkCatppuccinOpt { name = "waybar"; } // { - mode = lib.mkOption { - type = lib.types.enum [ - "prependImport" - "createLink" - ]; - default = "prependImport"; - description = '' - Defines how to include the catppuccin theme css file: + config, + lib, + ... +}: let + inherit (config.rose-pine) sources; - - `prependImport`: Prepends the import statement, if `programs.waybar.style` is a string (with default override priority). - - `createLink`: Creates a symbolic link `~/.config/waybar/catppuccin.css`, which needs to be included in the waybar stylesheet. - ''; + cfg = config.programs.waybar.rose-pine; + enable = cfg.enable && config.programs.waybar.enable; + + themeName = + if (cfg.flavor == "main") + then "rose-pine" + else "rose-pine-${cfg.flavor}"; + styleFile = "${sources.waybar}/${themeName}.css"; +in { + options.programs.waybar.rose-pine = + lib.rp.mkRosePineOpt {name = "waybar";} + // { + mode = lib.mkOption { + type = lib.types.enum [ + "prependImport" + "createLink" + ]; + default = "prependImport"; + description = '' + Defines how to include the Rosé Pine theme css file: + + - `prependImport`: Prepends the import statement, if `programs.waybar.style` is a string (with default override priority). + - `createLink`: Creates a symbolic link `~/.config/waybar/rose-pine.css`, which needs to be included in the waybar stylesheet. + ''; + }; }; - }; config = lib.mkIf enable ( lib.mkMerge [ @@ -29,7 +39,9 @@ in @import "${styleFile}"; ''; }) - (lib.mkIf (cfg.mode == "createLink") { xdg.configFile."waybar/catppuccin.css".source = styleFile; }) + (lib.mkIf (cfg.mode == "createLink") { + xdg.configFile."waybar/rose-pine.css".source = styleFile; + }) ] ); }