summaryrefslogtreecommitdiff
path: root/import-gsettings
diff options
context:
space:
mode:
Diffstat (limited to 'import-gsettings')
-rwxr-xr-ximport-gsettings11
1 files changed, 11 insertions, 0 deletions
diff --git a/import-gsettings b/import-gsettings
new file mode 100755
index 0000000..99fe4b4
--- /dev/null
+++ b/import-gsettings
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# usage: import-gsettings <gsettings key>:<settings.ini key> <gsettings key>:<settings.ini key> ...
+
+expression=""
+for pair in "$@"; do
+ IFS=:; set -- $pair
+ expressions="$expressions -e 's:^$2=(.*)$:gsettings set org.gnome.desktop.interface $1 \1:e'"
+done
+IFS=
+eval exec sed -E $expressions "${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini >/dev/null