TTY pulse: constant layout, blue <-> dark grey (no more block-off)

The on/off pulse shifted the whole line by one character during the
dark frames (off-frame printed one space fewer than the block frame).
Per YuKu: keep the block ALWAYS present and alternate its colour
instead — blue (44) <-> dark grey (100, bright black). Layout is
constant, pulse is colour-based, nothing moves but the block itself.

Also: disable_selinux now mkdir -p's /etc/selinux before writing a
fresh config (harness caught a die on a missing parent dir).
This commit is contained in:
Pathfinder
2026-10-27 22:45:43 +01:00
parent 71780291a3
commit 4a53155c7e
2 changed files with 12 additions and 21 deletions
+10 -15
View File
@@ -123,9 +123,10 @@ ui_quiet_run() {
# shades must differ enough to survive flicker fusion — a subtle ramp
# at 20fps reads as a solid block (VM-proven).
256) bg=( "48;5;17" "48;5;19" "48;5;21" "48;5;27" "48;5;33" "48;5;39" "48;5;45" "48;5;39" "48;5;33" "48;5;27" "48;5;21" "48;5;19" ) ;;
# On/off pulse, NOT shade alternation: console blues fuse to solid.
# Empty element = frame without the block (block breathes in/out).
16) bg=( "44" "44" "" "" ) ;;
# Colour pulse with CONSTANT layout: blue <-> dark grey (bright black).
# Never remove the block on a frame — a missing block shifted the
# whole line by one char on the console (VM-proven).
16) bg=( "44" "44" "100" "100" ) ;;
esac
local -a ch=( "|" "/" "-" "\\" )
@@ -138,19 +139,10 @@ ui_quiet_run() {
| tail -n 1 || true)
if (( depth >= 16 )); then
local code="${bg[$(( f % ${#bg[@]} ))]}"
if [[ -n "$code" ]]; then
if [[ -n "$cur" ]]; then
printf '\r\033[%sm \033[0m %s: %s' "$code" "$msg" "$cur" >&2
else
printf '\r\033[%sm \033[0m %s' "$code" "$msg" >&2
fi
if [[ -n "$cur" ]]; then
printf '\r\033[%sm \033[0m %s: %s' "$code" "$msg" "$cur" >&2
else
# block "breathes out": just the text that frame
if [[ -n "$cur" ]]; then
printf '\r %s: %s' "$msg" "$cur" >&2
else
printf '\r %s' "$msg" >&2
fi
printf '\r\033[%sm \033[0m %s' "$code" "$msg" >&2
fi
else
if [[ -n "$cur" ]]; then
@@ -357,6 +349,9 @@ disable_selinux() {
sudo cp "$cfg" "${cfg}.bkp.$(date +%F)"
sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/' "$cfg"
else
# belt-and-suspenders: on real Fedora /etc/selinux always exists, but
# do not die if it somehow does not
sudo mkdir -p "$(dirname "$cfg")"
printf 'SELINUX=disabled\nSELINUXTYPE=targeted\n' | sudo tee "$cfg" >/dev/null
fi
ok "SELINUX=disabled written to $cfg (backup saved). Reboot to apply."