2019-04-25 03:41:43 +00:00
|
|
|
#! /bin/sh
|
2019-12-11 05:52:23 +00:00
|
|
|
# -*- sh -*-
|
2019-04-25 03:41:43 +00:00
|
|
|
# Lifted from https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
|
|
|
# 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
|