From d774fca10cd63b295abd6050e545cc08c4966d2d Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 7 Sep 2023 09:22:22 +0100 Subject: [PATCH] Set hyprland theme directly from flake input Set GTK env dynamically from config --- flake.nix | 5 +++++ home/hyprland/config.nix | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 20f427ad..303c69ec 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,10 @@ url = "github:catppuccin/gitui"; flake = false; }; + catppuccin-hyprland = { + url = "github:catppuccin/hyprland"; + flake = false; + }; catppuccin-zathura = { url = "github:catppuccin/zathura"; flake = false; @@ -50,6 +54,7 @@ bat = "${catppuccin-bat}/Catppuccin-mocha.tmTheme"; fish = "${catppuccin-fish}/themes/Catppuccin Mocha.theme"; gitui = "${catppuccin-gitui}/theme/mocha.ron"; + hyprland = "${catppuccin-hyprland}/themes/mocha.conf"; zathura = "${catppuccin-zathura}/src/catppuccin-mocha"; zsh = "${catppuccin-zsh}/themes/catppuccin_mocha-zsh-syntax-highlighting.zsh"; diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index 66cfa6db..1c18480c 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -1,4 +1,4 @@ -{ pkgs, anyrun, ... }: +{ config, pkgs, anyrun, catppuccin-themes, ... }: let anyrunPackage = anyrun.packages.${pkgs.system}.anyrun; emacsPackage = pkgs.emacs29-pgtk; @@ -6,7 +6,7 @@ let rofiPackage = pkgs.rofi-wayland; swaylockPackage = pkgs.swaylock-effects; in '' - source = ./macchiato.conf + source = ${catppuccin-themes.hyprland} source = ./extra.conf monitor=,preferred,auto,auto @@ -14,8 +14,8 @@ in '' env = XDG_SESSION_TYPE=wayland env = XDG_SESSION_DESKTOP=Hyprland env = GDK_BACKEND=wayland,x11 - env = GTK_THEME,Sweet-Dark - env = XCURSOR_THEME,Catppuccin-Macchiato-Dark-Cursors + env = GTK_THEME,${config.gtk.theme.name} + env = XCURSOR_THEME,${config.gtk.cursorTheme.name} env = XCURSOR_SIZE,24 env = QT_AUTO_SCREEN_SCALE_FACTOR=1 env = QT_QPA_PLATFORM=wayland;xcb