From 35a679865c97d939fb783ce4efbeb2e39f4339ef Mon Sep 17 00:00:00 2001 From: Random936 Date: Sun, 23 Aug 2026 10:58:20 -0400 Subject: [PATCH] Fix gtk theme to work with dark mode --- config/headful.nix | 10 +++++++++- home/modules/gui-apps.nix | 20 +++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/config/headful.nix b/config/headful.nix index 4f1b075..3effd39 100644 --- a/config/headful.nix +++ b/config/headful.nix @@ -36,10 +36,18 @@ # Suppress greetd's default virtual terminal log spam. systemd.services.greetd.serviceConfig.LogStandardStream = "journal"; - # XDG Desktop Portals (used for wayland screen sharing, file pickets, etc.) + # XDG Desktop Portals (used for wayland screen sharing, file pickers, etc.) xdg.portal = { enable = true; wlr.enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + config = { + common = { + default = [ "wlr" "gtk" ]; + "org.freedesktop.impl.portal.Settings" = [ "gtk" ]; + "org.freedesktop.impl.portal.FileChooser" = [ "gtk" ]; + }; + }; }; # Configure keymap diff --git a/home/modules/gui-apps.nix b/home/modules/gui-apps.nix index 5ef7967..2517ec7 100644 --- a/home/modules/gui-apps.nix +++ b/home/modules/gui-apps.nix @@ -36,13 +36,27 @@ gtk = let theme = { - name = "Colloid-dark"; + name = "Colloid-Dark"; package = pkgs.colloid-gtk-theme; }; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; in { enable = true; - inherit theme; - gtk4.theme = theme; + inherit theme iconTheme; + gtk4 = { + inherit theme iconTheme; + extraConfig = { + gtk-application-prefer-dark-theme = 1; + gtk-color-scheme = "prefer-dark"; + }; + }; + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = 1; + gtk-color-scheme = "prefer-dark"; + }; }; xdg.mimeApps = {