Update file run_onchange_after_25-gnome-extension-settings.tmpl

This commit is contained in:
Brian Zalewski 2023-01-10 04:59:51 +00:00
parent 13c006315c
commit fed748ea90

View file

@ -45,9 +45,19 @@ fi
if [ -f "$HOME/.config/desktop/gnome.yml" ]; then 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 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_ID="$(echo "$EXT" | jq -r '.regex')"
EXT_SETTINGS_TYPE="$(echo "$EXT" | jq -r '.settings | type')"
EXT_SETTINGS="$(echo "$EXT" | jq -r '.settings')" EXT_SETTINGS="$(echo "$EXT" | jq -r '.settings')"
if [ "$EXT_SETTINGS" != 'null' ]; then 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' logg success 'Applied gsettings configuration for the `'"$EXT_ID"'` GNOME extension'
fi fi
done done