aboutsummaryrefslogtreecommitdiff
path: root/home/dot_local/share/mode/switch.d/executable_gtk
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2026-08-02 14:48:29 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2026-08-02 14:48:29 +0200
commite43eb1177872f52e949fb5f0f93396ed94b0d093 (patch)
tree78b73af6a989fa2996d71b112e161b70d35081ef /home/dot_local/share/mode/switch.d/executable_gtk
parent2f14a896e4b897bd747c24d7ad8e9e7bb3237d03 (diff)
move to chezmoi
Diffstat (limited to 'home/dot_local/share/mode/switch.d/executable_gtk')
-rw-r--r--home/dot_local/share/mode/switch.d/executable_gtk11
1 files changed, 11 insertions, 0 deletions
diff --git a/home/dot_local/share/mode/switch.d/executable_gtk b/home/dot_local/share/mode/switch.d/executable_gtk
new file mode 100644
index 0000000..95d3e53
--- /dev/null
+++ b/home/dot_local/share/mode/switch.d/executable_gtk
@@ -0,0 +1,11 @@
+#!/bin/sh
+GTK_3_SETTINGS_INI="$XDG_CONFIG_HOME/gtk-3.0/settings.ini"
+if [ "$mode" = "light" ]; then
+ 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 -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
+