fixing gtk back to normal

This commit is contained in:
Noah Masur 2022-05-14 20:29:03 -04:00
parent c75bffa0dc
commit 9d6898e0d3
4 changed files with 29 additions and 19 deletions

View File

@ -33,10 +33,7 @@
gui = { gui = {
colorscheme = (import ./modules/colorscheme/gruvbox); colorscheme = (import ./modules/colorscheme/gruvbox);
wallpaper = ../../../downloads/nix.jpg; wallpaper = ../../../downloads/nix.jpg;
gtk.theme = { gtk.theme = { name = "Adwaita-dark"; };
name = "Adwaita-dark";
package = "gnome-themes-extra";
};
}; };
}; };

View File

@ -111,18 +111,8 @@
}; };
}; };
gtk = {
enable = true;
theme =
config.services.xserver.displayManager.lightdm.greeters.gtk.theme;
};
}; };
# Required for setting GTK theme (for preferred-color-scheme in browser)
services.dbus.packages = [ pkgs.dconf ];
programs.dconf.enable = true;
}; };
} }

View File

@ -33,6 +33,7 @@
package = mkOption { package = mkOption {
type = types.str; type = types.str;
description = "Theme package name for GTK applications"; description = "Theme package name for GTK applications";
default = "gnome-themes-extra";
}; };
}; };
colorscheme = mkOption { colorscheme = mkOption {

View File

@ -1,4 +1,13 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }:
let
gtkTheme = {
name = config.gui.gtk.theme.name;
package = pkgs.${config.gui.gtk.theme.package};
};
in {
config = lib.mkIf config.gui.enable { config = lib.mkIf config.gui.enable {
@ -15,10 +24,7 @@
enable = config.services.xserver.enable; enable = config.services.xserver.enable;
# Make the login screen dark # Make the login screen dark
greeters.gtk.theme = { greeters.gtk.theme = gtkTheme;
name = config.gui.gtk.theme.name;
package = pkgs."${config.gui.gtk.theme.package}";
};
}; };
}; };
@ -30,11 +36,27 @@
xclip # Clipboard xclip # Clipboard
]; ];
# Required for setting GTK theme (for preferred-color-scheme in browser)
services.dbus.packages = [ pkgs.dconf ];
programs.dconf.enable = true;
environment.sessionVariables = { GTK_THEME = config.gui.gtk.theme.name; };
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.fish.shellAliases = { programs.fish.shellAliases = {
pbcopy = "xclip -selection clipboard -in"; pbcopy = "xclip -selection clipboard -in";
pbpaste = "xclip -selection clipboard -out"; pbpaste = "xclip -selection clipboard -out";
}; };
gtk = let gtkExtraConfig = { gtk-application-prefer-dark-theme = true; };
in {
enable = true;
theme = gtkTheme;
gtk3.extraConfig = gtkExtraConfig;
gtk4.extraConfig = gtkExtraConfig;
};
}; };
}; };