Show the screensaver logo on update and offer a reboot

This commit is contained in:
SirBlob committed 2026-09-24 11:45:01 -04:00
1 parent 2c506f99dd
commit 4ad1a384cc
5 files changed
+34 -13

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ text)
blob-launch-editor ~/.config/blob/branding/about.txt >/dev/null 2>&1 && blob-launch-about >/dev/null 2>&1 blob-launch-editor ~/.config/blob/branding/about.txt >/dev/null 2>&1 && blob-launch-about >/dev/null 2>&1
;; ;;
reset) reset)
cp "$BLOB_PATH/icon.txt" ~/.config/blob/branding/about.txt && blob-launch-about >/dev/null 2>&1 cp "$BLOB_PATH/branding/about.txt" ~/.config/blob/branding/about.txt && blob-launch-about >/dev/null 2>&1
;; ;;
*) *)
echo "Usage: blob-branding-about <image|text|reset>" >&2 echo "Usage: blob-branding-about <image|text|reset>" >&2
+1 -1
View File
@@ -19,7 +19,7 @@ text)
blob-launch-editor ~/.config/blob/branding/screensaver.txt >/dev/null 2>&1 && blob-launch-screensaver force >/dev/null 2>&1 blob-launch-editor ~/.config/blob/branding/screensaver.txt >/dev/null 2>&1 && blob-launch-screensaver force >/dev/null 2>&1
;; ;;
reset) reset)
cp "$BLOB_PATH/logo.txt" ~/.config/blob/branding/screensaver.txt && blob-launch-screensaver force >/dev/null 2>&1 cp "$BLOB_PATH/branding/screensaver.txt" ~/.config/blob/branding/screensaver.txt && blob-launch-screensaver force >/dev/null 2>&1
;; ;;
*) *)
echo "Usage: blob-branding-screensaver <image|text|reset>" >&2 echo "Usage: blob-branding-screensaver <image|text|reset>" >&2
+11 -3
View File
@@ -2,8 +2,16 @@
# blob:summary=Display the Blob logo in the terminal using green color. # blob:summary=Display the Blob logo in the terminal using green color.
user_logo_file="$HOME/.config/blob/branding/screensaver.txt"
shipped_logo_file="$BLOB_PATH/branding/screensaver.txt"
logo_file="$user_logo_file"
[[ -s $logo_file ]] || logo_file="$shipped_logo_file"
clear clear
echo -e "\033[32m" if [[ -s $logo_file ]]; then
cat <$BLOB_PATH/logo.txt echo -e "\033[32m"
echo -e "\033[0m" cat <"$logo_file"
echo -e "\033[0m"
fi
echo echo
+17 -6
View File
@@ -49,12 +49,9 @@ line_count() {
} }
show_header() { show_header() {
if has_gum; then blob-show-logo
gum style --border rounded --border-foreground "$accent_color" --padding "0 2" --margin "1 0" \ styled "$accent_color" --bold "Blob Update"
--bold "Blob Update" "$(date '+%A %-d %B, %H:%M')" styled "$muted_color" "$(date '+%A %-d %B, %H:%M')"
else
printf '\nBlob Update - %s\n\n' "$(date '+%A %-d %B, %H:%M')"
fi
} }
begin_step() { begin_step() {
@@ -187,6 +184,19 @@ show_summary() {
fi fi
} }
offer_reboot() {
[[ $reboot_needed == true && $confirm == true ]] || return 0
echo
if has_gum; then
gum confirm "The kernel was updated. Reboot now?" || return 0
else
local answer
read -rp "The kernel was updated. Reboot now? [y/N] " answer
[[ $answer == [yY] ]] || return 0
fi
blob-system-reboot
}
show_header show_header
gather_pending gather_pending
@@ -235,3 +245,4 @@ notify_body="System and AUR packages are up to date"
blob-notify-send "Update complete" "$notify_body" blob-notify-send "Update complete" "$notify_body"
blob-hook post-update blob-hook post-update
offer_reboot
+4 -2
View File
@@ -194,12 +194,14 @@ on it:
blob update blob update
``` ```
Checks for updates first and lists every pending system and AUR package with Opens with the logo from `~/.config/blob/branding/screensaver.txt` (falling back
to `branding/screensaver.txt`), the same text the screensaver draws, so
`blob branding screensaver` changes both. It checks for updates first and lists every pending system and AUR package with
its old and new version, then asks once with `gum confirm` (`--no-confirm` its old and new version, then asks once with `gum confirm` (`--no-confirm`
skips it). When nothing is pending it says so and stops. The update itself runs skips it). When nothing is pending it says so and stops. The update itself runs
as four numbered steps: refresh the keyring, `pacman -Syu`, `yay -Sua` when the as four numbered steps: refresh the keyring, `pacman -Syu`, `yay -Sua` when the
AUR is reachable, and prune orphans. It ends with a summary of what changed and AUR is reachable, and prune orphans. It ends with a summary of what changed and
how long it took, a reminder to reboot when a new kernel came in, and a how long it took, an offer to reboot when a new kernel came in, and a
notification. A failed step is named on screen and in a critical notification. `blob update-available` notification. A failed step is named on screen and in a critical notification. `blob update-available`
prints the pending count that the bar's update indicator reads. The indicator prints the pending count that the bar's update indicator reads. The indicator
rechecks every six hours and a few seconds after any pacman transaction, so it rechecks every six hours and a few seconds after any pacman transaction, so it