Fix 2720 closed-flip call wakeups/preservation, live timezone sync, and Power menu

- Default CPU_RPM_SLEEP=0, CPU_L2_SLEEP=0, and MODEM_DRX_MODE=0 across bananarchy-power-policy.conf, bananarchy-power-policy.sh, bananarchy-display-power-sync, and kernel patch 0010 so closed-flip incoming calls wake APSS promptly via smd-edge without AT port contention.
- Serialize sxmo_modem.sh incoming/finished call checks, expire stale /tmp/sxmo_hangup_requested flags, re-verify live ModemManager call state before ringing/raising callscreen, guard idle/flip-open HANGUP_CLOSE paths in locker.so, callscreen.so, bananarchy-idle-lock.sh, and bananarchy-lid, preserve calls on flip-open (UNGRAB/RAISE), and add closed-flip cover call controls (bananarchy-cover-idle, bananarchy-cover-event.sh, bananarchy-volume-keys).
- Propagate live network/manual timezone updates across statusbar, locker.so, bananarchy-cover-idle, bananarchy-dsds, callscreen.so, and bananarchy-run-aligned without reboot (scripts/test-time-timezone-sync.py), remove non-functional Logout from the Power menu, ignore post-call sxmo_calls markers, add scripts/build-dwm-plugins.sh, and update a1114 (carbonara) hashes and docs.
This commit is contained in:
Luxferre committed 2026-11-14 10:57:29 +02:00
1 parent 786480a08f
commit 8b466ef8ae
110 files changed
+2728 -285

No files matched your search

+63 -21
View File
@@ -36,7 +36,7 @@ BOOT_ATTEMPTS=30
SYNC_WAIT=15
# Host tests (and callers that already have privileges) can skip the doas hop.
if [ "$(id -u)" != "0" ] && [ "${BANANARCHY_TIME_SYNC_NO_ESCALATION:-0}" != "1" ]; then
if [ "${1:-}" != "refresh-ui" ] && [ "$(id -u)" != "0" ] && [ "${BANANARCHY_TIME_SYNC_NO_ESCALATION:-0}" != "1" ]; then
exec doas -n "$0" "$@"
fi
@@ -91,16 +91,54 @@ synced() {
[ -n "$ref" ] && [ "$ref" != "00000000" ]
}
burst_done() {
"$CHRONYC" -h "$SOCKET" activity 2>/dev/null | awk '
/^[0-9]+ sources doing burst/ { b = $1 }
END { exit !(b + 0 == 0) }
'
}
wait_sync_complete() {
wait_s="${BANANARCHY_SYNC_WAIT:-$SYNC_WAIT}"
sleep_s="${BANANARCHY_TIME_SYNC_SLEEP:-1}"
i=0
while [ "$i" -lt "$wait_s" ]; do
if synced && burst_done; then
return 0
fi
sleep "$sleep_s"
i=$((i + 1))
done
synced
}
refresh_statusbar() {
# chronyd can step the clock by decades (e.g. from a 1970 RTC to network
# time). Republish the status bar clock and charge icon as the X session
# user so they do not stay stale until the next 300 s periodic tick.
su user -s /bin/sh -c '
HOME=/home/user DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/10000 \
SXMO_WM=dwm SXMO_STATUS_NAME=default SXMO_STATE=/run/user/10000/sxmo.state \
PATH=/usr/share/sxmo/default_hooks:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin \
sxmo_hook_statusbar.sh refresh
' >/dev/null 2>&1 || true
# time) or the user can switch timezones live. Republish desktop statusbar,
# xlocker, 2720 cover display, and realign bananarchy-run-aligned immediately.
su_cmd="${BANANARCHY_STATUS_REFRESH_CMD:-su}"
if [ "$(id -u)" = "0" ]; then
"$su_cmd" user -s /bin/sh -c '
HOME=/home/user DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/10000 \
SXMO_WM=dwm SXMO_STATUS_NAME=default SXMO_STATE=/run/user/10000/sxmo.state \
PATH=/usr/share/sxmo/default_hooks:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin \
sxmo_hook_statusbar.sh refresh
' >/dev/null 2>&1 || true
else
HOME="${HOME:-/home/user}" DISPLAY="${DISPLAY:-:0}" \
XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/10000}" \
SXMO_WM=dwm SXMO_STATUS_NAME=default \
SXMO_STATE="${SXMO_STATE:-/run/user/10000/sxmo.state}" \
PATH="/usr/share/sxmo/default_hooks:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/usr/sbin:$PATH" \
sxmo_hook_statusbar.sh refresh >/dev/null 2>&1 || true
fi
locker_fifo="${BANANARCHY_LOCKER_FIFO:-/tmp/dwm_plugin_locker.fifo}"
if [ -p "$locker_fifo" ] || [ -f "$locker_fifo" ]; then
timeout 1 sh -c 'printf "REFRESH_TIME\n" > "$1"' _ "$locker_fifo" >/dev/null 2>&1 || true
fi
coverctl="${BANANARCHY_COVERCTL:-/usr/bin/bananarchy-coverctl}"
"$coverctl" REFRESH >/dev/null 2>&1 || true
killall -q -USR1 bananarchy-run-aligned >/dev/null 2>&1 || true
}
# refresh re-resolves pool names asynchronously. Keep retrying while DNS is
@@ -170,16 +208,11 @@ sync_now() {
echo "Network time unavailable: chronyd or DNS is not ready"
return 1
fi
i=0
while [ "$i" -lt "$SYNC_WAIT" ]; do
if synced; then
refresh_statusbar
printf 'Network time synced: %s\n' "$(date -u '+%Y-%m-%d %H:%M:%S UTC')"
return 0
fi
sleep 1
i=$((i + 1))
done
if wait_sync_complete; then
refresh_statusbar
printf 'Network time synced: %s\n' "$(date -u '+%Y-%m-%d %H:%M:%S UTC')"
return 0
fi
echo "Network time not confirmed yet; retry when the network is up"
return 1
}
@@ -190,19 +223,28 @@ case "${1:-status}" in
[ "${1:-}" = "boot" ] && "$GPS_TIME_HELPER" boot >/dev/null 2>&1 || true
exit 0
fi
trigger "$1" && refresh_statusbar
if trigger "$1"; then
wait_sync_complete || true
refresh_statusbar
fi
;;
force)
if [ "$(time_source)" = "gps" ]; then
"$GPS_TIME_HELPER" sync && refresh_statusbar
exit $?
fi
trigger force && refresh_statusbar
if trigger force; then
wait_sync_complete || true
refresh_statusbar
fi
;;
sync)
sync_now
exit $?
;;
refresh-ui)
refresh_statusbar
;;
status)
if [ ! -S "$SOCKET" ]; then
echo "chronyd command socket absent"