From 58226a4562c5592dab52a9bbc1a85f37a02bd808 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Mon, 20 Jun 2022 19:53:41 +0100 Subject: [PATCH] Force GTK 4.0 to use the GTK 3 theming This non-compliant turd doesn't respect the config file, because of course it doesn't. Enforce the theme with yet another messy environment variable. Signed-off-by: Joe Groocock --- X11/xprofile | 4 +++- gtk-2.0/settings.ini | 3 --- gtk-4.0/settings.ini | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) create mode 120000 gtk-4.0/settings.ini diff --git a/X11/xprofile b/X11/xprofile index 9abd376..8bd4bde 100644 --- a/X11/xprofile +++ b/X11/xprofile @@ -4,11 +4,13 @@ export TERMINAL="alacritty" export BROWSER="firefox" -export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" +export GTK_THEME="$(grep gtk-theme-name "${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" | sed 's/.*\s*=\s*//')" export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/settings.ini" export QT_QPA_PLATFORMTHEME=qt5ct export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open +export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" + # https://www.reddit.com/r/linux/comments/72mfv8/psa_for_firefox_users_set_moz_use_xinput21_to/ export MOZ_USE_XINPUT2=1 # enable pixel-accurate scrolling in firefox diff --git a/gtk-2.0/settings.ini b/gtk-2.0/settings.ini index f96e997..e99e225 100644 --- a/gtk-2.0/settings.ini +++ b/gtk-2.0/settings.ini @@ -1,6 +1,3 @@ -# DO NOT EDIT! This file will be overwritten by LXAppearance. -# Any customization should be done in ~/.gtkrc-2.0.mine instead. - gtk-theme-name="Arc-Dark" gtk-icon-theme-name="Xenlism-Wildfire" gtk-font-name="sans 9" diff --git a/gtk-4.0/settings.ini b/gtk-4.0/settings.ini new file mode 120000 index 0000000..fbea1af --- /dev/null +++ b/gtk-4.0/settings.ini @@ -0,0 +1 @@ +../gtk-3.0/settings.ini \ No newline at end of file