dotfiles/sway/import_gsetting
James Patrick 0bdc4b55fc Added loader for GTK3 theming.
I'm hoping this will resolve some of the weirdness with some applications.
2019-04-24 23:41:43 -04:00

11 lines
452 B
Bash
Executable File

#! /bin/sh
# 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