aboutsummaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-29 10:09:29 +0200
committerDanilo M. <danix@danix.xyz>2026-09-29 10:09:29 +0200
commit0e2aefcf01613395e4f3bb966606a2c6ae6e46f9 (patch)
tree494650e7b8a2378af47f3da4b8ee41e9566cbe10 /install.sh
parent1e4d2b4be7ad20dd108503fb65c264673ca6457b (diff)
downloadunified-desktop-theme-0e2aefcf01613395e4f3bb966606a2c6ae6e46f9.tar.gz
unified-desktop-theme-0e2aefcf01613395e4f3bb966606a2c6ae6e46f9.zip
feat(grub): render grub-theme-udt's theme.txt and print its root install
theme.txt has no include, so udt-palette substitutes eight roles and the scheme name into the sibling repo's theme.txt.in, conky-style. The accent is the scheme's fixed one; nothing at boot can read the wallpaper. install.sh runs that repo's build as the user and, only when it succeeds, prints the root copy into /boot/grub/themes plus the one-time GRUB_THEME and grub-mkconfig steps. External targets are now skipped whenever their template is missing, not only when the repo is, so a sibling mid-setup cannot break an install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index 9626431..abcfd51 100755
--- a/install.sh
+++ b/install.sh
@@ -339,6 +339,24 @@ if [ -d "$sddm_repo/theme" ]; then
echo " printf '[Theme]\\nCurrent=udt\\n' > /etc/sddm.conf.d/udt.conf"
fi
+# GRUB. Same shape as SDDM: udt-palette has rendered theme.txt, the sibling
+# repo's build assembles the theme as the user, and the root half is printed.
+# A copy, not a link: GRUB reads /boot before /home is mounted. The background
+# is a snapshot of the wallpaper, so the copy needs rerunning after a scheme
+# or wallpaper change; grub-mkconfig only when GRUB_THEME changes.
+grub_repo="$(realpath -m "$repo/../grub-theme-udt")"
+if [ -x "$grub_repo/build" ]; then
+ if "$grub_repo/build"; then
+ echo
+ echo "grub theme: run these as root to install or refresh it"
+ echo " rm -rf /boot/grub/themes/udt && cp -r \"$grub_repo/build/udt\" /boot/grub/themes/"
+ echo " # once: GRUB_THEME=\"/boot/grub/themes/udt/theme.txt\" in /etc/default/grub, then"
+ echo " grub-mkconfig -o /boot/grub/grub.cfg"
+ else
+ echo "grub: its build failed, theme not refreshed" >&2
+ fi
+fi
+
[ -n "$reloaded" ] && echo "reloaded:$reloaded"
echo "installed:"