Keep the status bar clock minute-accurate, including while the panel is dark

- Add a lightweight statusbar_clock job (sxmo_run_aligned.sh 60 running
  sxmo_hook_statusbar.sh time) to all three sxmo_hook_start.sh copies while
  the heavier statusbar_periodics loop stays at 300 s.
- Let the time action refresh 099-time even when the screen is blanked; only
  the xsetroot publish remains gated by ! is_screen_dark, so the native
  desktop clock is redrawn as soon as the panel wakes.
- Guard the job and the time action in check-rebuild.sh, update AGENTS,
  MANUAL and the a1108 changelog, redeploy to the connected phone and
  rebuild the a1108 / dejavu image.
This commit is contained in:
Luxferre committed 2026-11-08 10:47:37 +02:00
1 parent fb091749f0
commit 4963022c10
8 files changed
+49 -4

No files matched your search

+16
View File
@@ -327,10 +327,15 @@ echo "[check] Status bar charge icon and clock refresh..."
BATTERY_HOOK="$BASE_DIR/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_battery.sh"
TIME_SYNC="$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-time-sync.sh"
BATTERY_CASE="$(sed -n '/^ battery)/,/^ ;;/p' "$STATUS_HOOK")"
TIME_CASE="$(sed -n '/^ time)/,/^ ;;/p' "$STATUS_HOOK")"
if ! printf '%s\n' "$BATTERY_CASE" | grep -q 'set_time' || \
! printf '%s\n' "$BATTERY_CASE" | grep -q 'force_bar=1'; then
fail "battery events no longer republish the charge icon and clock"
fi
if ! printf '%s\n' "$TIME_CASE" | grep -q 'set_time' || \
printf '%s\n' "$TIME_CASE" | grep -q 'is_screen_dark && exit'; then
fail "time action no longer keeps the clock file current while dark"
fi
if ! grep -q '^ refresh)' "$STATUS_HOOK" || \
! grep -q 'refresh_statusbar' "$TIME_SYNC"; then
fail "post-sync status bar refresh is missing"
@@ -341,6 +346,17 @@ fi
if ! grep -q 'rm -f "$ICON_FILE"' "$BATTERY_HOOK"; then
fail "forced battery refresh no longer republishes an unchanged charge icon"
fi
for f in "$BASE_DIR/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_start.sh" \
"$BASE_DIR/overlay/rootfs/etc/skel/.config/sxmo/hooks/sxmo_hook_start.sh" \
"$BASE_DIR/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh"; do
if ! grep -q 'statusbar_clock' "$f" || \
! grep -q 'sxmo_run_aligned.sh 60' "$f"; then
fail "${f#$BASE_DIR/} no longer refreshes the clock every minute"
fi
if ! sh -n "$f" 2>/dev/null; then
fail "shell syntax: ${f#$BASE_DIR/}"
fi
done
for f in "$BATTERY_HOOK" "$TIME_SYNC" "$STATUS_HOOK"; do
if ! sh -n "$f" 2>/dev/null; then
fail "shell syntax: ${f#$BASE_DIR/}"