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:
+10
-15
@@ -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."
|
||||
|
||||
+2
-6
@@ -45,7 +45,7 @@ _ub_busy_loop() {
|
||||
depth=$(_ub_depth)
|
||||
case "$depth" in
|
||||
256) pal=(17 19 21 27 33 39 45 39 33 27 21 19) ;; # deep breathe: dark navy to bright blue
|
||||
16) pal=(44 44 "" "") ;; # on/off pulse: console blues fuse
|
||||
16) pal=(44 44 100 100) ;; # blue <-> dark grey, constant layout
|
||||
*) pal=("|" "/" "-" "\\") ;; # last-resort spinner
|
||||
esac
|
||||
while :; do
|
||||
@@ -53,11 +53,7 @@ _ub_busy_loop() {
|
||||
if [[ "$depth" -eq 256 ]]; then
|
||||
_ub_paint "48;5;$i" "$_UB_MSG" # 256-colour cube background
|
||||
elif [[ "$depth" -eq 16 ]]; then
|
||||
if [[ -n "$i" ]]; then
|
||||
_ub_paint "$i" "$_UB_MSG" # plain ANSI background (blue)
|
||||
else
|
||||
printf '\r %s' "$_UB_MSG" >&"$_UB_FD" # block breathes out
|
||||
fi
|
||||
_ub_paint "$i" "$_UB_MSG" # blue <-> dark grey pulse
|
||||
else
|
||||
printf '\r[%s] %s' "$i" "$_UB_MSG" >&"$_UB_FD"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user