Preconfigure Abjects IRC, refresh status bar charge icon and clock, update live device
- Ship ~/.config/sxmo/irc_servers.tsv (home and /etc/skel) with Abjects (irc.abjects.net, TLS port 6697) auto-joining #bananarchy, and change the compiled irc.so defaults to the same network; rebuild and mirror irc.so. - Republish the charge icon together with a fresh clock on battery events, force the icon on state_change and forced battery refreshes, and add a lightweight refresh action called after an NTP clock step. - Update the connected phone: sync network time, apk update plus apk upgrade -a, deploy the overlay and restart xirc; verify the status bar clock and charge icon; rebuild the a1108 / dejavu image. - Guard the new IRC and status bar paths in check-rebuild.sh and sync README, MANUAL, AGENTS and the a1108 changelog.
This commit is contained in:
1 parent
8448b6465f
commit
fb091749f0
13 files changed
+139
-11
No files matched your search
@@ -77,6 +77,18 @@ synced() {
|
||||
[ -n "$ref" ] && [ "$ref" != "00000000" ]
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
# refresh re-resolves pool names asynchronously. Keep retrying while DNS is
|
||||
# still down; the boot caller allows a minute, later network events a few
|
||||
# seconds. No stamp is written on failure, so the next event can retry.
|
||||
@@ -137,6 +149,7 @@ sync_now() {
|
||||
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
|
||||
@@ -149,10 +162,10 @@ sync_now() {
|
||||
|
||||
case "${1:-status}" in
|
||||
boot|network-up)
|
||||
trigger "$1"
|
||||
trigger "$1" && refresh_statusbar
|
||||
;;
|
||||
force)
|
||||
trigger force
|
||||
trigger force && refresh_statusbar
|
||||
;;
|
||||
sync)
|
||||
sync_now
|
||||
|
||||
Reference in new issue
Block a user