diff --git a/modules/hjem-ctp/default.nix b/modules/hjem-ctp/default.nix index 2582ef0..c42164e 100644 --- a/modules/hjem-ctp/default.nix +++ b/modules/hjem-ctp/default.nix @@ -21,6 +21,7 @@ in ./fuzzel.nix # ./plasma.nix ./vencord.nix + ./wleave.nix ]; _module.args = { inherit ctp-lib; }; diff --git a/modules/hjem-ctp/wleave.nix b/modules/hjem-ctp/wleave.nix new file mode 100644 index 0000000..798a042 --- /dev/null +++ b/modules/hjem-ctp/wleave.nix @@ -0,0 +1,46 @@ +# Catppuccin theme for wleave +{ + config, + ctp-lib, + lib, + pkgs, + ... +}: +let + cfg = config.ctp.wleave; + + src = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "wleave"; + rev = "b690cee13b944890e43a5fb629ccdff86cffbbb3"; + hash = "sha256-QUSDx5M+BG7YqI4MBsOKFPxvZHQtCa8ibT0Ln4FPQ7I="; + }; + + # Generate the CSS required to override all icons + # with their Catppuccin-ified counterparts + iconsCss = + lib.concatMapStrings + (btn: '' + #${btn} { background-image: url("${src}/icons/wleave/${cfg.flavor}/${cfg.accent}/${btn}.svg"); } + '') + [ + "lock" + "logout" + "suspend" + "hibernate" + "shutdown" + "reboot" + ]; +in +{ + options.ctp.wleave = ctp-lib.mkCatppuccinOptions "wleave" { + withAccent = true; + }; + + config = lib.mkIf cfg.enable { + files.".config/wleave/style.css".source = pkgs.concatText "wleave-style.css" [ + "${src}/themes/${cfg.flavor}/${cfg.accent}.css" + (pkgs.writeText "wleave-icons.css" iconsCss) + ]; + }; +} diff --git a/users/leah/presets/niri/default.nix b/users/leah/presets/niri/default.nix index 71a8d78..3242e16 100644 --- a/users/leah/presets/niri/default.nix +++ b/users/leah/presets/niri/default.nix @@ -22,6 +22,7 @@ waybar xwayland-satellite brightnessctl + wleave # Desktop utilities file-roller diff --git a/users/leah/presets/niri/waybar/config.nix b/users/leah/presets/niri/waybar/config.nix index 5a4b05a..ae5bd85 100644 --- a/users/leah/presets/niri/waybar/config.nix +++ b/users/leah/presets/niri/waybar/config.nix @@ -21,7 +21,7 @@ let text = '' poll_rate=$1 - intel_gpu_top -J -s $poll_rate | jq -c --unbuffered --stream ' + intel_gpu_top -J -s "$poll_rate" | jq -c --unbuffered --stream ' fromstream(2|truncate_stream(inputs)) | select(has("Render/3D")) | { @@ -44,6 +44,7 @@ map (v: common // v) [ "group/appearance" "group/connectivity" "battery" + "custom/wleave" ]; "group/apps" = { @@ -176,6 +177,10 @@ map (v: common // v) [ on-click-right = "swaync-client -d -sw"; escape = true; }; + "custom/wleave" = { + format = ""; + on-click = "wleave"; + }; } { name = "dock"; diff --git a/users/leah/presets/niri/waybar/style.css b/users/leah/presets/niri/waybar/style.css index e81fb7d..e05cd45 100644 --- a/users/leah/presets/niri/waybar/style.css +++ b/users/leah/presets/niri/waybar/style.css @@ -77,7 +77,7 @@ window.top > * > box { #cpu { color: #fab387; /* Peach */ } -#custom-gpu { +#custom-gpu-nvidia, #custom-gpu-intel { color: #b4befe; /* Lavender */ } #memory { @@ -113,6 +113,10 @@ window.top > * > box { color: #f38ba8; /* Red */ } +#custom-wleave { + color: #f38ba8; /* Red */ +} + /* Workspaces */ #workspaces button label { margin: 0.5rem 0.4rem; diff --git a/users/leah/programs/default.nix b/users/leah/programs/default.nix index 8656b2a..365332a 100644 --- a/users/leah/programs/default.nix +++ b/users/leah/programs/default.nix @@ -34,6 +34,7 @@ vlc thunderbird telegram-desktop + inkscape # Command-line apps just