Console pulse: one-third speed (150ms frames), 256-ramp untouched

YuKu: 'slow the flicker a bit (half or one-third speed)'. The 16-colour
blue<->grey pulse now ticks at 150ms (600ms full cycle, calm); the
256-colour terminal breathe keeps its 50ms deep ramp. Per-depth tick
variable; same in the vendored helper.

Rate proven by pty trace: 8 frames in a 1.2s transaction = 150ms
exactly. (Frame-counting via grep -c undercounts — \r overwrites
collapse frames onto one line; count matches, not lines.)
This commit is contained in:
Pathfinder
2026-10-27 22:48:50 +01:00
parent 4a53155c7e
commit 0630acf020
2 changed files with 10 additions and 3 deletions
+7 -1
View File
@@ -117,6 +117,12 @@ ui_quiet_run() {
# "solid blue, no breathing" on the console). Cap to the 16-color path.
case "${TERM:-}" in linux*|console*) depth=16 ;; esac
# Per-depth frame interval: the console colour-pulse runs slower (a fast
# blue/grey flip reads as flicker — YuKu asked for half-to-third speed);
# the 256-colour breathe ramp keeps its 50ms.
local tick=0.05
(( depth == 16 )) && tick=0.15
local -a bg=()
case "$depth" in
# Deep-amplitude breathe: dark navy (17) to BRIGHT blue (45). Adjacent
@@ -152,7 +158,7 @@ ui_quiet_run() {
fi
fi
f=$(( f + 1 ))
sleep 0.05
sleep "$tick"
done
local rc=0
+3 -2
View File
@@ -41,8 +41,9 @@ _ub_paint() {
}
_ub_busy_loop() {
local depth pal=() i
local depth pal=() i tick=0.05
depth=$(_ub_depth)
[[ "$depth" -eq 16 ]] && tick=0.15 # console pulse: slow, not flicker
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 100 100) ;; # blue <-> dark grey, constant layout
@@ -57,7 +58,7 @@ _ub_busy_loop() {
else
printf '\r[%s] %s' "$i" "$_UB_MSG" >&"$_UB_FD"
fi
sleep 0.05 || return 0
sleep "$tick" || return 0
done
done
}