os/pkgs/import-gtk-settings.nix

13 lines
388 B
Nix
Raw Normal View History

2023-01-28 20:49:10 +00:00
self:
with self; ''
2021-05-30 19:10:28 +00:00
# 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"/gtk-3.0/settings.ini >/dev/null
''