diff options
author | zachir <zachir@librem.one> | 2023-06-12 00:16:38 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-06-12 00:17:07 -0500 |
commit | 83621322fe4697ff4cf76bade8014bfaa8574af9 (patch) | |
tree | cdcb8bca31547c5ccaec55bef95c12ab8cb22706 | |
parent | 5e2699233e820884e98e1bb0ac65266e016bba8a (diff) |
Add gsettings import script
-rwxr-xr-x | import-gsettings | 11 |
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 |