Fix GTK theme

This commit is contained in:
Erwin Boskma 2024-02-09 20:43:09 +01:00
parent 8f5c2f90a2
commit 2be4b97177
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
2 changed files with 30 additions and 27 deletions

View file

@ -11,6 +11,11 @@ let
homeCfg = config.home-manager.users.erwin; homeCfg = config.home-manager.users.erwin;
bt = config.eboskma.bluetooth; bt = config.eboskma.bluetooth;
gtkTheme = {
name = "io.elementary.stylesheet.slate";
package = pkgs.pantheon.elementary-gtk-theme;
};
ewwDaemon = ewwDaemon =
let let
path = lib.makeBinPath ( path = lib.makeBinPath (
@ -248,7 +253,7 @@ in
pointerCursor = { pointerCursor = {
name = "elementary"; name = "elementary";
package = pkgs.pantheon.elementary-gtk-theme; package = gtkTheme.package;
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
}; };
@ -294,6 +299,12 @@ in
enable = true; enable = true;
createDirectories = true; createDirectories = true;
}; };
configFile."gtk-4.0/gtk.css" = lib.mkForce {
text = ''
@import url("file://${gtkTheme.package}/share/themes/${gtkTheme.name}/gtk-4.0/gtk-dark.css");
'';
};
}; };
i18n.inputMethod = { i18n.inputMethod = {
@ -313,10 +324,7 @@ in
gtk = { gtk = {
enable = true; enable = true;
theme = { theme = gtkTheme;
name = "elementary";
package = pkgs.pantheon.elementary-gtk-theme;
};
iconTheme = { iconTheme = {
name = "elementary"; name = "elementary";

View file

@ -9,20 +9,10 @@ with lib;
let let
cfg = config.eboskma.users.erwin; cfg = config.eboskma.users.erwin;
# remoteSessionScript = pkgs.writeShellScriptBin "remote-session" '' gtkTheme = {
# ${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 2560x1440 name = "io.elementary.stylesheet.slate";
# ${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 2560x1440 --right-of DP-0 package = pkgs.pantheon.elementary-gtk-theme;
# ${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-2560.png} };
# ${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-2560.png}
# systemctl --user restart polybar
# '';
# localSessionScript = pkgs.writeShellScriptBin "local-session" ''
# ${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3840x2160
# ${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 3840x2160 --right-of DP-0
# ${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-3840.png}
# ${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png}
# systemctl --user restart polybar
# '';
ewwDaemon = ewwDaemon =
let let
@ -310,7 +300,7 @@ in
pointerCursor = { pointerCursor = {
name = "elementary"; name = "elementary";
package = pkgs.pantheon.elementary-gtk-theme; package = gtkTheme.package;
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
}; };
@ -351,6 +341,12 @@ in
enable = true; enable = true;
createDirectories = true; createDirectories = true;
}; };
configFile."gtk-4.0/gtk.css" = lib.mkForce {
text = ''
@import url("file://${gtkTheme.package}/share/themes/${gtkTheme.name}/gtk-4.0/gtk-dark.css");
'';
};
}; };
dconf.settings = { dconf.settings = {
@ -361,10 +357,7 @@ in
gtk = { gtk = {
enable = true; enable = true;
theme = { theme = gtkTheme;
name = "elementary";
package = pkgs.pantheon.elementary-gtk-theme;
};
iconTheme = { iconTheme = {
name = "elementary"; name = "elementary";
@ -379,11 +372,13 @@ in
}; };
}; };
gtk4.extraConfig = { gtk4 = {
extraConfig = {
gtk-application-prefer-dark-theme = 1; gtk-application-prefer-dark-theme = 1;
# gtk-cursor-theme-name = "elementary"; # gtk-cursor-theme-name = "elementary";
}; };
}; };
};
i18n.inputMethod = { i18n.inputMethod = {
enabled = "fcitx5"; enabled = "fcitx5";