diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-29 11:56:14 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-29 11:56:14 +0200 |
| commit | 3bcadc0fd35cb1e077a77c847bbc044ca2fabce3 (patch) | |
| tree | 9cc8bb74806eb266b0244c40858dfa0b9e9026e2 /install.sh | |
| parent | ff7dcf3ef2338a0aef1856a33da06d1a92c2434c (diff) | |
| download | unified-desktop-theme-3bcadc0fd35cb1e077a77c847bbc044ca2fabce3.tar.gz unified-desktop-theme-3bcadc0fd35cb1e077a77c847bbc044ca2fabce3.zip | |
feat(steps): hand pending root steps to a quickshell window
Notification balloons carried the GRUB and homepage root commands, but a
balloon cannot stay open while its commands are pasted into a root shell.
bin/udt-steps NAME writes a consumer's pending steps to
~/.cache/udt/steps/NAME and pokes quickshell's appearance shell, which shows
one tab per file on DP-3. Empty stdin clears the tab, so producers report
on every run and a consumer that caught up drops out by itself.
udt-grub and udt-homepage now route through it. install.sh's SDDM block
checks what is installed and reports only the steps still missing, rather
than printing the full install on every run. udt-homepage remembers the
last staged pair, since udt-accent now also runs on icon switches, which
change neither file and would re-raise the finish steps for nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -104,7 +104,7 @@ ln -sfn "$HOME/.cache/udt/colors.json" "$HOME/.cache/wal/colors.json" # The rofi menus are bound by name in hypr-theme's keybindings, so they keep # the names they had when they lived loose in ~/bin. -for f in udt-accent udt-grub udt-palette udt-machine-name udt-powermenu.sh udt-launcher.sh qar-scrotmenu.sh; do +for f in udt-accent udt-grub udt-steps udt-palette udt-machine-name udt-powermenu.sh udt-launcher.sh qar-scrotmenu.sh; do ln -sfn "$repo/bin/$f" "$HOME/bin/$f" done @@ -327,16 +327,27 @@ if pgrep -x conky >/dev/null 2>&1; then fi # SDDM. The theme code is root-installed, but the palette the greeter reads has -# to stay live, so the root block below symlinks the generated file in. Printed, -# never run: /usr/share/sddm is root-owned and this script is not. -sddm_repo="$repo/../sddm-theme-udt" +# to stay live, so the root block below symlinks the generated file in. Never +# run here: /usr/share/sddm is root-owned and this script is not. Only the +# steps still needed are printed and handed to the steps window; none clears +# its tab. +sddm_repo="$(realpath -m "$repo/../sddm-theme-udt")" if [ -d "$sddm_repo/theme" ]; then + sddm=/usr/share/sddm/themes/udt + sddm_conf="$HOME/.local/share/udt/sddm-theme.conf" + sddm_steps="$( + diff -rq -x theme.conf.user "$sddm_repo/theme" "$sddm" >/dev/null 2>&1 || + printf ' install -d %s\n cp -r "%s/theme/." %s/\n' "$sddm" "$sddm_repo" "$sddm" + [ "$(readlink "$sddm/theme.conf.user")" = "$sddm_conf" ] || + printf ' ln -sfn "%s" %s/theme.conf.user\n' "$sddm_conf" "$sddm" + grep -qx 'Current=udt' /etc/sddm.conf.d/udt.conf 2>/dev/null || + printf " printf '[Theme]\\\\nCurrent=udt\\\\n' > /etc/sddm.conf.d/udt.conf\n" + )" + [ -n "$sddm_steps" ] && sddm_steps="The SDDM theme is out of date. As root: +$sddm_steps" echo - echo "sddm theme: run these as root to install or refresh it" - echo " install -d /usr/share/sddm/themes/udt" - echo " cp -r \"$sddm_repo/theme/.\" /usr/share/sddm/themes/udt/" - echo " ln -sfn \"$HOME/.local/share/udt/sddm-theme.conf\" /usr/share/sddm/themes/udt/theme.conf.user" - echo " printf '[Theme]\\nCurrent=udt\\n' > /etc/sddm.conf.d/udt.conf" + echo "sddm theme: ${sddm_steps:-up to date}" + printf '%s' "$sddm_steps" | "$repo/bin/udt-steps" sddm fi # GRUB. Same shape as SDDM: udt-palette has rendered theme.txt, and udt-grub |
