infra/pkgs/import-gtk-settings.nix
Benjamin Yule Bädorf 56ea689de6
feat: add nix config to this repository
This used to live in the old pub-solar/os repository in the `momo/main`
branch. This commit changes that so this repository has all code from
terraform to nix.
2024-02-25 17:41:25 +01:00

13 lines
388 B
Nix

self:
with self; ''
# 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
''