From dd88e2f06391cff9eacb113aa205835d76469bb0 Mon Sep 17 00:00:00 2001
From: matt1432 <matt@nelim.org>
Date: Thu, 6 Jul 2023 16:13:25 -0400
Subject: [PATCH] feat: use different icons for waybar systray

---
 configs/hypr/main.conf  |  4 ++--
 nixos/configuration.nix | 10 +---------
 nixos/home/bashdots.nix |  2 +-
 nixos/home/hyprland.nix |  3 +++
 4 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/configs/hypr/main.conf b/configs/hypr/main.conf
index 24fe65dd..785b39d7 100644
--- a/configs/hypr/main.conf
+++ b/configs/hypr/main.conf
@@ -17,7 +17,7 @@ exec-once = $HOME/.config/lisgd/config &
 # See https://wiki.hyprland.org/Configuring/Keywords/ for more
 
 # Execute your favorite apps at launch
-exec-once = bash -c "sleep 3; XDG_DATA_DIRS=/home/matt/.nix/configs/share nm-applet"
+exec-once = bash -c "sleep 3; XDG_DATA_DIRS=$kora nm-applet"
 exec-once = bash -c "sleep 4; blueberry-tray"
 exec-once = bash -c "sleep 5; nextcloud --background"
 exec-once = bash -c "sleep 6; tutanota-desktop -a"
@@ -37,7 +37,7 @@ exec-once = $menu
 exec-once = hyprpaper
 
 # after boot, there are 2 bars for some reason, so I kill them and rerun the command
-exec-once = bash -c "killall -r -0 waybar && killall -r waybar; XDG_DATA_DIRS=/home/matt/.nix/configs/share waybar"
+exec-once = bash -c "killall -r -0 waybar && killall -r waybar; XDG_DATA_DIRS=$kora waybar"
 exec-once = swaync
 
 exec-once = wl-paste --watch cliphist store
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index 8dd0c723..da53c8d8 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -28,18 +28,10 @@
   nixpkgs.config.allowUnfree = true;
 
 
-  # TODO: see if setting them in Hyprland.nix works
   environment.sessionVariables = {
+    NIXPKGS_ALLOW_UNFREE = "1";
     GTK_THEME 		 = "Lavanda-Dark";
     QT_QPA_PLATFORMTHEME = "qt5ct";
-    QT_STYLE_OVERRIDE	 = "kvantum";
-    QT_FONT_DPI		 = "125";
-  };
-
-  environment.variables = {
-    GTK_THEME 		 = "Lavanda-Dark";
-    QT_QPA_PLATFORMTHEME = "qt5ct";
-    QT_STYLE_OVERRIDE	 = "kvantum";
     QT_FONT_DPI		 = "125";
   };
 
diff --git a/nixos/home/bashdots.nix b/nixos/home/bashdots.nix
index f599b70a..a01b3d53 100644
--- a/nixos/home/bashdots.nix
+++ b/nixos/home/bashdots.nix
@@ -50,7 +50,7 @@
       jelly = "mosh matt@10.0.0.121 -- ssh -t matt@10.0.0.123 'tmux -2u new -At laptop'";
       qbit  = "mosh matt@10.0.0.121 -- ssh -t matt@10.0.0.128 'tmux -2u new -At laptop'";
     };
-    sessionVariables = { # see hyprland.nix
+    sessionVariables = { # see configuration.nix
       TERM = "xterm-color";
     };
 
diff --git a/nixos/home/hyprland.nix b/nixos/home/hyprland.nix
index 3f062bb7..866b42a3 100644
--- a/nixos/home/hyprland.nix
+++ b/nixos/home/hyprland.nix
@@ -13,6 +13,7 @@ in
   home.packages = [
     (builtins.getFlake "github:hyprwm/Hyprland").packages.x86_64-linux.default
     (builtins.getFlake "path:/home/matt/git/hyprland-touch-gestures").packages.x86_64-linux.default
+    pkgs.kora-icon-theme
   ];
 
   imports = [
@@ -29,6 +30,7 @@ in
 
     extraConfig = ''
       env = XDG_DATA_DIRS, ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS
+      $kora = "$HOME/.config/share"
 
       env = EWW_PATH, $HOME/.nix/configs/eww/scripts
       env = HYPR_PATH, $HOME/.nix/configs/hypr/scripts
@@ -40,6 +42,7 @@ in
 
   # https://www.reddit.com/r/NixOS/comments/vc3srj/comment/iccqxw1/?utm_source=share&utm_medium=web2x&context=3
   xdg.configFile = {
+    "share/icons/hicolor".source  = "${pkgs.kora-icon-theme}/share/icons/kora-pgrey";
     "hypr/main.conf".source       = config.lib.file.mkOutOfStoreSymlink "${configDir}/hypr/main.conf";
     "hypr/hyprpaper.conf".source  = config.lib.file.mkOutOfStoreSymlink "${configDir}/hypr/hyprpaper.conf";
   };