Update 3 files
- /home/.chezmoiscripts/universal/run_onchange_after_3-system-bin.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_19-theme-files.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl
This commit is contained in:
parent
4b1ff37687
commit
49148f1473
3 changed files with 12 additions and 19 deletions
|
@ -4,6 +4,12 @@
|
|||
{{ includeTemplate "universal/profile" }}
|
||||
{{ includeTemplate "universal/logg" }}
|
||||
|
||||
### Ensure /usr/local/bin/squash-symlink is present
|
||||
if [ ! -f /usr/local/bin/squash-symlink ] && [ -f "$HOME/.local/bin/squash-symlink" ]; then
|
||||
logg info 'Copying ~/.local/bin/squash-symlink to /usr/local/bin/squash-symlink'
|
||||
sudo cp -f "$HOME/.local/bin/squash-symlink" /usr/local/bin/squash-symlink
|
||||
fi
|
||||
|
||||
### Clean up system theme settings
|
||||
for ITEM_TO_BE_REMOVED in "/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
|
||||
|
@ -21,7 +27,7 @@ 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/betelgeuse/share/ /usr/local/
|
||||
sudo cp -rf ~/.local/src/betelgeuse/share /usr/local/
|
||||
else
|
||||
logg warn '~/.local/src/betelgeuse/share is missing'
|
||||
fi
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{{- if (eq .host.distro.family "linux") -}}
|
||||
#!/usr/bin/env bash
|
||||
|
||||
{{ includeTemplate "universal/profile" }}
|
||||
{{ includeTemplate "universal/logg" }}
|
||||
|
||||
### Copy ~/.local/bin/squash-symlink to /usr/local/bin/squash-symlink
|
||||
if [ ! -f /usr/local/bin/squash-symlink ] && [ -f "$HOME/.local/bin/squash-symlink" ]; then
|
||||
logg info 'Copying ~/.local/bin/squash-symlink to /usr/local/bin/squash-symlink'
|
||||
sudo cp -f "$HOME/.local/bin/squash-symlink" /usr/local/bin/squash-symlink
|
||||
fi
|
||||
|
||||
{{ end -}}
|
|
@ -18,7 +18,7 @@ fi
|
|||
|
||||
### Copy GRUB theme to /boot/grub2/themes
|
||||
if [ -d /usr/local/share/grub/themes ]; then
|
||||
sudo cp -rf /usr/local/share/grub/themes/ /boot/grub2/themes
|
||||
sudo cp -rf /usr/local/share/grub/themes /boot/grub2/
|
||||
logg success 'Copied GRUB themes in /usr/local/share/grub/themes to /boot/grub2/themes'
|
||||
else
|
||||
logg warn '`/usr/local/share/grub/themes` is missing'
|
||||
|
@ -64,7 +64,7 @@ if [ -f /etc/default/grub ]; then
|
|||
### GRUB_THEME
|
||||
logg info 'Setting GRUB_THEME={{ .theme }} in /etc/default/grub'
|
||||
if cat /etc/default/grub | grep GRUB_THEME; then
|
||||
sudo sed -i 's/.*GRUB_THEME.*/GRUB_THEME="{{ .theme }}-'"$GRUB_RESOLUTION_TYPE"'/' /etc/default/grub
|
||||
sudo sed -i 's/.*GRUB_THEME.*/GRUB_THEME="{{ .theme }}-'"$GRUB_RESOLUTION_TYPE"'"/' /etc/default/grub
|
||||
else
|
||||
echo 'GRUB_THEME="{{ .theme }}-'"$GRUB_RESOLUTION_TYPE"'"' | sudo tee -a /etc/default/grub
|
||||
fi
|
||||
|
@ -72,7 +72,7 @@ if [ -f /etc/default/grub ]; then
|
|||
### GRUB_BACKGROUND
|
||||
logg info 'Setting GRUB_BACKGROUND=/usr/local/share/grub/{{ .theme }}-blue.png in /etc/default/grub'
|
||||
if cat /etc/default/grub | grep GRUB_BACKGROUND; then
|
||||
sudo sed -i 's/.*GRUB_BACKGROUND.*/GRUB_BACKGROUND="/usr/local/share/grub/{{ .theme }}-blue.png"/' /etc/default/grub
|
||||
sudo sed -i 's/.*GRUB_BACKGROUND.*/GRUB_BACKGROUND="\/usr\/local\/share\/grub\/{{ .theme }}-blue.png"/' /etc/default/grub
|
||||
else
|
||||
echo 'GRUB_BACKGROUND="/usr/local/share/grub/{{ .theme }}-blue.png"' | sudo tee -a /etc/default/grub
|
||||
fi
|
||||
|
@ -87,12 +87,12 @@ if [ -f /etc/default/grub ]; then
|
|||
|
||||
### GRUB_FORCE_HIDDEN_MENU
|
||||
logg info 'Setting GRUB_FORCE_HIDDEN_MENU={{ .grub.shiftToSee }} in /etc/default/grub'
|
||||
sudo sed -i 's/GRUB_FORCE_HIDDEN_MENU/d' /etc/default/grub
|
||||
sudo sed -i '/GRUB_FORCE_HIDDEN_MENU/d' /etc/default/grub
|
||||
echo "GRUB_FORCE_HIDDEN_MENU={{ .grub.shiftToSee }}" | sudo tee -a /etc/default/grub
|
||||
|
||||
### Remove duplicate lines in /etc/default/grub
|
||||
logg info 'Ensuring there are no duplicate entries in /etc/default/grub'
|
||||
cat /etc/default/grub | uniq -u | sudo tee /etc/default/grub
|
||||
cat /etc/default/grub | uniq | sudo tee /etc/default/grub > /dev/null
|
||||
else
|
||||
logg warn '/etc/default/grub is missing'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue