From fed748ea90e0b01c41641af029ea3a59c1ecbd83 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 10 Jan 2023 04:59:51 +0000 Subject: [PATCH] Update file run_onchange_after_25-gnome-extension-settings.tmpl --- ...n_onchange_after_25-gnome-extension-settings.tmpl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_25-gnome-extension-settings.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_25-gnome-extension-settings.tmpl index 2487a952..2f508de8 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_25-gnome-extension-settings.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_25-gnome-extension-settings.tmpl @@ -45,9 +45,19 @@ fi if [ -f "$HOME/.config/desktop/gnome.yml" ]; then cat "$HOME/.config/desktop/gnome.yml" | yq e -o=j '.' | jq -cr '.default_gnome_extensions[]' | while read EXT; do EXT_ID="$(echo "$EXT" | jq -r '.regex')" + EXT_SETTINGS_TYPE="$(echo "$EXT" | jq -r '.settings | type')" EXT_SETTINGS="$(echo "$EXT" | jq -r '.settings')" if [ "$EXT_SETTINGS" != 'null' ]; then - eval "$EXT_SETTINGS" + logg info 'Evaluating extension settings' + if [ "$EXT_SETTINGS_TYPE" == 'array' ]; then + echo "$EXT_SETTINGS" | jq -cr '.' | while read EXT_SETTING; do + echo "$EXT_SETTING" + eval "$EXT_SETTING" + done + else + echo "$EXT_SETTINGS" + eval "$EXT_SETTINGS" + fi logg success 'Applied gsettings configuration for the `'"$EXT_ID"'` GNOME extension' fi done