Files
desktop-base/debian/postinst
T
2026-04-03 00:19:54 -07:00

49 lines
2.0 KiB
Bash

#!/bin/sh
set -e
#DEBHELPER#
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ]; then
mkdir -p /usr/share/images/desktop-base
# Register vesperos as a desktop theme option.
# active-theme is the master; all per-theme files are slaves so that
# a single `update-alternatives --config desktop-theme` switches everything.
update-alternatives --install \
/usr/share/desktop-base/active-theme \
desktop-theme \
/usr/share/desktop-base/vesperos-theme \
50 \
--slave /usr/share/images/desktop-base/desktop-background \
desktop-background \
/usr/share/desktop-base/vesperos-theme/wallpaper/contents/images/1920x1080.svg \
--slave /usr/share/images/desktop-base/desktop-background.xml \
desktop-background.xml \
/usr/share/desktop-base/vesperos-theme/wallpaper/gnome-background.xml \
--slave /usr/share/images/desktop-base/desktop-lockscreen.xml \
desktop-lockscreen.xml \
/usr/share/desktop-base/vesperos-theme/wallpaper/gnome-background.xml \
--slave /usr/share/images/desktop-base/login-background.svg \
desktop-login-background \
/usr/share/desktop-base/vesperos-theme/login/background.svg \
--slave /usr/share/images/desktop-base/desktop-grub.png \
desktop-grub \
/usr/share/desktop-base/vesperos-theme/grub/grub-16x9.png \
--slave /usr/share/desktop-base/grub_background.sh \
desktop-grub.sh \
/usr/share/desktop-base/vesperos-theme/grub/grub_background.sh
# Update GRUB if present
if command -v update-grub > /dev/null 2>&1; then
sync
update-grub || echo "Updating grub failed, report success anyway!"
fi
# Plymouth theme — sets plymouthd.conf, default.plymouth, and rebuilds initramfs
if command -v plymouth-set-default-theme > /dev/null 2>&1; then
plymouth-set-default-theme -R vesperos
fi
fi