aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-23 17:21:51 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-23 17:21:51 +0100
commit22ce06e37b1a12e638206559ef0dddd27879fa5e (patch)
treedd38ce07737b46027b9653b46db75b2f82b9461e
parent5912fd0894420c1a1f49032af10ebb50d13b9763 (diff)
use default gtk theme
-rw-r--r--.config/gtk-3.0/settings.ini (renamed from .config/gtk-3.0/settings.ini##template)8
-rw-r--r--.config/gtk-4.0/env5
-rwxr-xr-x.local/share/mode/switch.d/gtk7
3 files changed, 9 insertions, 11 deletions
diff --git a/.config/gtk-3.0/settings.ini##template b/.config/gtk-3.0/settings.ini
index c8792aa..5c6573f 100644
--- a/.config/gtk-3.0/settings.ini##template
+++ b/.config/gtk-3.0/settings.ini
@@ -1,5 +1,5 @@
[Settings]
-gtk-application-prefer-dark-theme=true
+gtk-application-prefer-light-theme=1
gtk-icon-theme-name=Adwaita
gtk-font-name=Inter 9
gtk-cursor-theme-size=0
@@ -13,8 +13,4 @@ gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-cursor-theme-name=OpenZone_Black_Slim
-{% if yadm.hostname == "thoncc" %}
-gtk-theme-name=Skeuos-Blue-Light
-{% else %}
-gtk-theme-name=Skeuos-Blue-Dark
-{% endif %}
+gtk-theme-name=adw-gtk3-light
diff --git a/.config/gtk-4.0/env b/.config/gtk-4.0/env
new file mode 100644
index 0000000..42b34f5
--- /dev/null
+++ b/.config/gtk-4.0/env
@@ -0,0 +1,5 @@
+#!/bin/sh
+export GTK_THEME="adw-gtk3"
+. "$XDG_CACHE_HOME/mode/state/theme"
+[ "$mode" = "dark" ] && GTK_THEME="$GTK_THEME:dark"
+export GTK_THEME
diff --git a/.local/share/mode/switch.d/gtk b/.local/share/mode/switch.d/gtk
index 63a2f83..95d3e53 100755
--- a/.local/share/mode/switch.d/gtk
+++ b/.local/share/mode/switch.d/gtk
@@ -1,13 +1,10 @@
#!/bin/sh
GTK_3_SETTINGS_INI="$XDG_CONFIG_HOME/gtk-3.0/settings.ini"
-GTK_4_SETTINGS_ENV="$XDG_CONFIG_HOME/gtk-4.0/env"
if [ "$mode" = "light" ]; then
- sed 's/^\(export\s\+GTK_THEME=.\+\)-Dark\(.*\)$/\1-Light\2/g' -i "$GTK_4_SETTINGS_ENV"
- sed "s/-Dark/-Light/" -i "$GTK_3_SETTINGS_INI"
+ sed -e 's/-Dark/-Light/' -e 's/-dark/-light/' -i "$GTK_3_SETTINGS_INI"
sed "s/gtk-application-prefer-dark-theme.*/gtk-application-prefer-dark-theme=false/" -i "$GTK_3_SETTINGS_INI"
else
- sed 's/^\(export\s\+GTK_THEME=.\+\)-Light\(.*\)$/\1-Dark\2/g' -i "$GTK_4_SETTINGS_ENV"
- sed "s/-Light/-Dark/" -i "$GTK_3_SETTINGS_INI"
+ sed -e 's/-Dark/-Light/' -e 's/-dark/-light/' -i "$GTK_3_SETTINGS_INI"
sed "s/gtk-application-prefer-dark-theme.*/gtk-application-prefer-dark-theme=true/" -i "$GTK_3_SETTINGS_INI"
fi
grep gtk-theme-name "$GTK_3_SETTINGS_INI" | cut -f2 -d= | xargs xfconf-query -c xsettings -p /Net/ThemeName -s