Update 3 files

- /home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_61-plymouth-settings.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_25-gnome-extension-settings.tmpl
This commit is contained in:
Brian Zalewski 2023-01-11 23:41:09 +00:00
parent 798e847c7e
commit 218964ca2c
3 changed files with 11 additions and 9 deletions

View file

@ -15,9 +15,9 @@ fi
### Populate /tmp/install-gnome-extensions.txt with GNOME extensions that need to be installed
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_URL="$(echo "$EXT" | jq -r '.url')"
EXT_ID="$(echo "$EXT" | jq -r '.regex')"
cat "$HOME/.config/desktop/gnome.yml" | yq e -o=j '.' | jq -cr '.default_gnome_extensions[] | tojson' | while read EXT; do
EXT_URL="$(echo "$EXT" | jq -nr '.url')"
EXT_ID="$(echo "$EXT" | jq -nr '.regex')"
echo "$EXT_URL" >> /tmp/install-gnome-extensions.txt
find "$XDG_DATA_DIR/gnome-shell/extensions" -mindepth 1 -maxdepth 1 -type d | while read EXT_FOLDER; do
if [[ "$EXT_FOLDER" == "$EXT_REGEX"* ]]; then
@ -45,22 +45,22 @@ fi
### Apply plugin gsettings
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[] | tojson' | while read EXT; do
if [ "$DEBUG_MODE" == 'true' ]; then
logg info 'Extension data:'
echo "$EXT"
fi
EXT_ID="$(echo "$EXT" | jq -r '.regex')"
EXT_ID="$(echo "$EXT" | jq -nr '.regex')"
if [ "$DEBUG_MODE" == 'true' ]; then
logg info 'Extension ID:'
echo "$EXT_ID"
fi
EXT_SETTINGS_TYPE="$(echo "$EXT" | jq -r '.settings | type')"
EXT_SETTINGS="$(echo "$EXT" | jq -r '.settings')"
EXT_SETTINGS_TYPE="$(echo "$EXT" | jq -nr '.settings | type')"
EXT_SETTINGS="$(echo "$EXT" | jq -nr '.settings')"
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_SETTINGS" | jq -cnr '.[]' | while read EXT_SETTING; do
logg info 'Applying following extension setting:'
echo "$EXT_SETTING"
eval "$EXT_SETTING"

View file

@ -9,6 +9,8 @@ if command -v install-software > /dev/null; then
install-software plymouth
fi
set -x
### Apply update-alternatives
if command -v update-alternatives > /dev/null; then
if [ -f "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" ]; then

View file

@ -115,7 +115,7 @@ if [ -f "/boot/grub2/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/$GRUB_ICON.
else
logg warn "/boot/grub2/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/$GRUB_ICON.png is missing"
fi
set -x
### Ensure grub2-mkconfig is available
if ! command -v grub2-mkconfig > /dev/null; then
if command -v grub-mkconfig > /dev/null; then