Altered gtk.nix for better dark theme support

This commit is contained in:
2026-03-16 07:56:19 +00:00
parent 08e1e856bf
commit 007762e25e
2 changed files with 31 additions and 18 deletions
+22 -13
View File
@@ -462,16 +462,21 @@ This sets the session variables
{ config, pkgs, user, ... }:
{
environment.sessionVariables = {
XDG_SESSION_TYPE = "wayland"; # Session type
XDG_CURRENT_DESKTOP = "Hyprland"; # Desktop environment
XCURSOR_SIZE = "24"; # Cursor size
GTK_ENABLE_DARK_MODE=1;
XDG_SESSION_TYPE = "wayland";
XDG_CURRENT_DESKTOP = "Hyprland";
XCURSOR_SIZE = "24";
GTK_ENABLE_DARK_MODE = "1";
GTK_THEME = "Catppuccin-Mocha-Standard-Blue-Dark";
GTK_APPLICATION_PREFER_DARK_THEME = "1";
# Add these for Firefox/Zen Browser:
MOZ_ENABLE_WAYLAND = "1"; # If on Wayland
GTK_ICON_THEME = "Papirus-Dark";
# Use this instead of GTK_APPLICATION_PREFER_DARK_THEME for newer GTK apps:
GTK_THEME_VARIANT = "dark";
# For Qt apps (if any):
QT_STYLE_OVERRIDE = "gtk2";
# For Zen Browser (Firefox fork):
MOZ_ENABLE_WAYLAND = "1";
GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/glib-2.0/schemas";
};
};
# Add other session-wide variables here (e.g., QT_QPA_PLATFORM, SDL_VIDEODRIVER)
}
#+END_SRC
@@ -1039,15 +1044,19 @@ This file configures gtk
{
environment.systemPackages = with pkgs; [
catppuccin-gtk
catppuccin.gtk.mocha.standard.blue
papirus-icon-theme
];
environment.sessionVariables = {
GTK_THEME = "Catppuccin-Mocha-Standard-Blue-Dark";
GTK_ICON_THEME = "Papirus-Dark";
GTK_APPLICATION_PREFER_DARK_THEME = "1";
programs.gtk = {
enable = true;
gtk3.enable = true;
theme.name = "Catppuccin-Mocha-Standard-Blue-Dark";
theme.variant = "dark";
iconTheme.name = "Papirus-Dark";
};
# Check session.nix for variables !
}
#+END_SRC
+9 -5
View File
@@ -2,13 +2,17 @@
{
environment.systemPackages = with pkgs; [
catppuccin-gtk
catppuccin.gtk.mocha.standard.blue
papirus-icon-theme
];
environment.sessionVariables = {
GTK_THEME = "Catppuccin-Mocha-Standard-Blue-Dark";
GTK_ICON_THEME = "Papirus-Dark";
GTK_APPLICATION_PREFER_DARK_THEME = "1";
programs.gtk = {
enable = true;
gtk3.enable = true;
theme.name = "Catppuccin-Mocha-Standard-Blue-Dark";
theme.variant = "dark";
iconTheme.name = "Papirus-Dark";
};
# Check session.nix for variables !
}