summaryrefslogtreecommitdiff
path: root/scripts/import-gsettings
diff options
context:
space:
mode:
authorJake Koroman <jake@jakekoroman.com>2026-05-03 10:37:41 -0400
committerJake Koroman <jake@jakekoroman.com>2026-05-03 10:37:41 -0400
commitbe002f4d0294f706a4a43925caea84379670f93b (patch)
treeee1cf77bbf3046e19f3c9b1602c05a8513fdcb63 /scripts/import-gsettings
parentc1a8b42fa8b439250b92efad483dc5a014dec164 (diff)
added sway. a whole bunch of changes.
Diffstat (limited to 'scripts/import-gsettings')
-rwxr-xr-xscripts/import-gsettings18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/import-gsettings b/scripts/import-gsettings
new file mode 100755
index 0000000..ab594ba
--- /dev/null
+++ b/scripts/import-gsettings
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# for wayland gtk settings
+# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
+
+
+config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
+if [ ! -f "$config" ]; then exit 1; fi
+
+gnome_schema="org.gnome.desktop.interface"
+gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
+icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
+cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
+font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
+gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
+gsettings set "$gnome_schema" icon-theme "$icon_theme"
+gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
+gsettings set "$gnome_schema" font-name "$font_name"