about summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-11-16 12:38:37 +0900
committersefidel <contact@sefidel.net>2023-11-16 12:38:37 +0900
commita84238d6a305555c85bac70c88f4edfea43ec6c3 (patch)
tree2b78df6b0d6c76140bfd480fe0bae91966079d17 /home
parentcb05f66c6a3334d450ae3e38952553dd0b8dc819 (diff)
downloadnixrc-a84238d6a305555c85bac70c88f4edfea43ec6c3.tar.gz
nixrc-a84238d6a305555c85bac70c88f4edfea43ec6c3.zip
feat(home/gui): configure darkman
Diffstat (limited to 'home')
-rw-r--r--home/profiles/gui/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/home/profiles/gui/default.nix b/home/profiles/gui/default.nix
index 2df34ef..9bd316e 100644
--- a/home/profiles/gui/default.nix
+++ b/home/profiles/gui/default.nix
@@ -250,6 +250,40 @@ in
         latitude = "36.5";
         longitude = "127.2";
       };
+
+      darkman = {
+        enable = true;
+        settings = {
+          lat = 36.5;
+          lng = 127.2;
+          usegeoclue = true;
+        };
+
+        darkModeScripts = {
+          gtk-theme = ''
+            ${pkgs.dconf}/bin/dconf write \
+              /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
+
+            ${pkgs.dconf}/bin/dconf write \
+              /org/gnome/desktop/interface/gtk-theme "'${neotheme.gtk.theme.dark}'"
+
+            ${pkgs.dconf}/bin/dconf write \
+              /org/gnome/desktop/interface/icon-theme "'${neotheme.gtk.iconTheme.dark}'"
+          '';
+        };
+        lightModeScripts = {
+          gtk-theme = ''
+            ${pkgs.dconf}/bin/dconf write \
+              /org/gnome/desktop/interface/color-scheme "'prefer-light'"
+
+            ${pkgs.dconf}/bin/dconf write \
+              /org/gnome/desktop/interface/gtk-theme "'${neotheme.gtk.theme.light}'"
+
+            ${pkgs.dconf}/bin/dconf write \
+              /org/gnome/desktop/interface/icon-theme "'${neotheme.gtk.iconTheme.light}'"
+          '';
+        };
+      };
     };
   };
 }