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 = {
colorscheme = (import ./modules/colorscheme/gruvbox);
wallpaper = ../../../downloads/nix.jpg;
gtk.theme = {
name = "Adwaita-dark";
package = "gnome-themes-extra";
};
gtk.theme = { name = "Adwaita-dark"; };
};
};

View File

@ -111,17 +111,7 @@
};
};
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 {
type = types.str;
description = "Theme package name for GTK applications";
default = "gnome-themes-extra";
};
};
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 {
@ -15,10 +24,7 @@
enable = config.services.xserver.enable;
# Make the login screen dark
greeters.gtk.theme = {
name = config.gui.gtk.theme.name;
package = pkgs."${config.gui.gtk.theme.package}";
};
greeters.gtk.theme = gtkTheme;
};
};
@ -30,11 +36,27 @@
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} = {
programs.fish.shellAliases = {
pbcopy = "xclip -selection clipboard -in";
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;
};
};
};