Update file run_onchange_after_25-gnome-extension-settings.tmpl
This commit is contained in:
parent
13c006315c
commit
fed748ea90
1 changed files with 11 additions and 1 deletions
|
@ -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
|
||||||
|
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"
|
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
|
||||||
|
|
Loading…
Reference in a new issue