From e1d74c0117ab52be60cf477f5a67ea4311323e8b Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 20 Oct 2024 12:19:42 -0700 Subject: [PATCH] feat(rofi): Catppuccin -> Rose Pine --- .sources/sources.json | 8 ++++---- modules/home-manager/rofi.nix | 27 +++++++++++++++++---------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.sources/sources.json b/.sources/sources.json index e663243..c2d154e 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -268,13 +268,13 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "catppuccin", + "owner": "rose-pine", "repo": "rofi" }, "branch": "main", - "revision": "b636a00fd40a7899a8206195464ae8b7f0450a6d", - "url": "https://github.com/catppuccin/rofi/archive/b636a00fd40a7899a8206195464ae8b7f0450a6d.tar.gz", - "hash": "1a1sr451nsfii70j2f5qf8wq4jns0d4477a2kzh3993xdnx1j3yc" + "revision": "414bb2538713a874dbb357f19212c96a011e1ac8", + "url": "https://github.com/rose-pine/rofi/archive/414bb2538713a874dbb357f19212c96a011e1ac8.tar.gz", + "hash": "19kif3nh0lr934blam971fm55pr1pdbn9b3lnrpc0yq2vpgf8x9y" }, "rose-pine-dunst": { "type": "Git", diff --git a/modules/home-manager/rofi.nix b/modules/home-manager/rofi.nix index 7fa6cad..bd5c2c3 100644 --- a/modules/home-manager/rofi.nix +++ b/modules/home-manager/rofi.nix @@ -1,18 +1,25 @@ -{ config, lib, ... }: -let - inherit (config.catppuccin) sources; - - cfg = config.programs.rofi.catppuccin; - enable = cfg.enable && config.programs.rofi.enable; -in { - options.programs.rofi.catppuccin = lib.ctp.mkCatppuccinOpt { name = "rofi"; }; + config, + lib, + ... +}: let + inherit (config.rose-pine) sources; + + cfg = config.programs.rofi.rose-pine; + enable = cfg.enable && config.programs.rofi.enable; + + themeName = + if (cfg.flavor == "main") + then "rose-pine" + else "rose-pine-${cfg.flavor}"; +in { + options.programs.rofi.rose-pine = lib.rp.mkRosePineOpt {name = "rofi";}; config.programs.rofi = lib.mkIf enable { theme = { "@theme" = builtins.path { - name = "catppuccin-${cfg.flavor}.rasi"; - path = "${sources.rofi}/basic/.local/share/rofi/themes/catppuccin-${cfg.flavor}.rasi"; + name = "${themeName}.rasi"; + path = "${sources.rofi}/${themeName}.rasi"; }; }; };