feat(hyprland): Catppuccin -> Rose Pine

This commit is contained in:
punkfairie 2024-10-19 23:39:46 -07:00
parent 57afe4a40e
commit d4c3806c8f
Signed by: punkfairie
GPG key ID: 01823C057725C266
2 changed files with 23 additions and 21 deletions

View file

@ -196,13 +196,13 @@
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "catppuccin",
"owner": "rose-pine",
"repo": "hyprland"
},
"branch": "main",
"revision": "c388ac55563ddeea0afe9df79d4bfff0096b146b",
"url": "https://github.com/catppuccin/hyprland/archive/c388ac55563ddeea0afe9df79d4bfff0096b146b.tar.gz",
"hash": "0cxzxfgbqnkdnvn8nch4z4s7izzlm2jgciq1s8cjmypf8g7vy9n5"
"revision": "6898fe967c59f9bec614a9a58993e0cb8090d052",
"url": "https://github.com/rose-pine/hyprland/archive/6898fe967c59f9bec614a9a58993e0cb8090d052.tar.gz",
"hash": "1l9xrrympg8ikvmq8mazb9x2byci4l230hqgyagvl3id8xkiicm1"
},
"imv": {
"type": "Git",

View file

@ -1,29 +1,31 @@
{ config, lib, ... }:
let
inherit (config.catppuccin) sources pointerCursor;
cfg = config.wayland.windowManager.hyprland.catppuccin;
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
in
{
options.wayland.windowManager.hyprland.catppuccin =
lib.ctp.mkCatppuccinOpt { name = "hyprland"; }
config,
lib,
...
}: let
inherit (config.rose-pine) sources;
cfg = config.wayland.windowManager.hyprland.rose-pine;
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
themeName =
if (cfg.flavor == "main")
then "rose-pine"
else "rose-pine-${cfg.flavor}";
in {
options.wayland.windowManager.hyprland.rose-pine =
lib.rp.mkRosePineOpt {name = "hyprland";}
// {
accent = lib.ctp.mkAccentOpt "hyprland";
accent = lib.rp.mkAccentOpt "hyprland";
};
config = lib.mkIf enable {
home.sessionVariables = lib.mkIf pointerCursor.enable {
HYPRCURSOR_SIZE = config.home.pointerCursor.size;
HYPRCURSOR_THEME = "catppuccin-${pointerCursor.flavor}-${pointerCursor.accent}-cursors";
};
wayland.windowManager.hyprland.settings = {
source = [
"${sources.hyprland}/themes/${cfg.flavor}.conf"
# Define accents in file to ensure they appear before user vars
"${sources.hyprland}/${themeName}.conf"
# Define accent in file to ensure it appears before user vars
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
$accent = ''$${cfg.accent}
$accentAlpha = ''$${cfg.accent}Alpha
'')
];
};