install.fairie/home/.chezmoiscripts/universal/run_onchange_after_19-theme-files.tmpl
Brian Zalewski 2d743be3bb Update 19 files
- /system/usr/local/share/run_onchange_after_setup-share-folder
- /system/var/log/user/run_onchange_after-symlink-user-logs
- /system/usr/share/run_onchange_after_setup-share-folder
- /system/etc/default/modify_grub
- /system/boot/efi/EFI/qubes/modify_grubenv
- /home/.chezmoiscripts/universal/run_onchange_after_14_install-aqua-packages.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_21-import-dconf-settings.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_20-apply-settings.mjs.tmpl
- /system/usr/local/bin/executable_squash-symlink
- /system/etc/modify_environment
- /home/.chezmoiscripts/universal/run_onchange_after_19-theme-files.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14_install-aqua-packages.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_21-dconf-settings.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_20-misc-settings.mjs.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_5-log-config.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_4-environment-profile.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_60-grub-settings.tmpl
- /home/dot_local/bin/executable_rclone-mount
- /home/.chezmoidata.yaml
2023-01-10 07:09:18 +00:00

37 lines
1.3 KiB
Cheetah

{{- if (eq .host.distro.family "linux") -}}
#!/usr/bin/env bash
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
### Clean up system theme settings
for ITEM_TO_BE_REMOVED of "/usr/share/backgrounds/images" "/usr/share/backgrounds/f32" "/usr/share/backgrounds/qubes" "/usr/share/wallpapers"; do
if [ -d "$ITEM_TO_BE_REMOVED" ] || [ -f "$ITEM_TO_BE_REMOVED" ]; then
sudo rm -rf "$ITEM_TO_BE_REMOVED"
logg success "Removed $ITEM_TO_BE_REMOVED"
fi
fi
### Ensure /usr/local/share exists
if [ ! -d /usr/local/share ]; then
sudo mkdir -p /usr/local/share
logg success 'Created /usr/local/share'
fi
### Copy theme files over to /usr/local/share
if [ -d "$HOME/.local/src/{{ .theme | lower }}/share" ]; then
logg info 'Copying ~/.local/src/{{ .theme | lower }}/share to /usr/local/share'
sudo cp -rf ~/.local/src/{{ .theme | lower }}/share/ /usr/local/share
else
logg warn '~/.local/src/betelgeuse/share is missing'
fi
### Flatten theme files (i.e. convert symlinks to regular files)
if command -v squash-symlink > /dev/null; then
logg info 'Converting all theme symlinks to equivalent regular files'
sudo find /usr/local/share -type l -exec squash-symlink {} +
else
logg warn '`squash-symlink` is not a script in the PATH'
fi
{{ end -}}