Fix xkopher link focus and unlock clock; battery longevity pass

Map xkopher link focus through wrapped display rows and reset horizontal scroll in no-wrap mode. Refresh the status bar clock on unlock and from dmenu before republishing root WM_NAME. Re-analysis found two low-risk wins: force lz4 for the active zram swap and disable proactive compaction. Rebuild dmenu.so and smallweb.so, update guards and docs, redeploy live, and rebuild the image.
This commit is contained in:
Luxferre committed 2026-11-08 08:45:53 +02:00
1 parent 85c6a7b886
commit 3543556735
22 files changed
+402 -54

No files matched your search

+53
View File
@@ -217,6 +217,59 @@ if ! grep -q 'var/lib/chrony' "$BASE_DIR/rebuild-image.sh"; then
fail "rebuild-image.sh no longer fixes chrony driftfile ownership"
fi
echo "[check] xkopher link focus visibility..."
SMALLWEB_SRC="$BASE_DIR/src/dwm-plugins/smallweb_plugin.cpp"
if ! grep -q 'buildRenderRows' "$SMALLWEB_SRC"; then
fail "smallweb_plugin.cpp lost its shared wrapped-row builder"
fi
if ! grep -q 'ensureFocusedLinkVisible' "$SMALLWEB_SRC"; then
fail "smallweb_plugin.cpp lost focused-link viewport scrolling"
fi
if grep -q 'scrollTopLine = std::max(0, static_cast<int>(i) - 4);' "$SMALLWEB_SRC"; then
fail "link focus still scrolls by logical line index instead of display rows"
fi
FOCUS_CALLS="$(grep -c 'ensureFocusedLinkVisible();' "$SMALLWEB_SRC" 2>/dev/null || echo 0)"
if [ "$FOCUS_CALLS" -lt 2 ]; then
fail "link focus and wrap toggle must both call ensureFocusedLinkVisible"
fi
echo "[check] Status bar clock freshness..."
DMENU_SRC="$BASE_DIR/src/sxmo-dmenu/dmenu.c"
UNLOCK_HOOK="$BASE_DIR/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_unlock.sh"
STATUS_HOOK="$BASE_DIR/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_statusbar.sh"
for token in refresh_status_time write_status_cache 099-time sxmo_status_bar_cache; do
if ! grep -q "$token" "$DMENU_SRC"; then
fail "dmenu.c no longer refreshes the status clock/cache ($token)"
fi
done
if ! grep -q 'sxmo_hook_statusbar.sh time' "$UNLOCK_HOOK"; then
fail "unlock hook no longer refreshes the clock synchronously"
fi
if ! grep -q 'force_bar' "$STATUS_HOOK"; then
fail "statusbar hook no longer forces a root-name refresh on unlock"
fi
for f in "$UNLOCK_HOOK" "$STATUS_HOOK"; do
if ! sh -n "$f" 2>/dev/null; then
fail "shell syntax: ${f#$BASE_DIR/}"
fi
done
echo "[check] Battery longevity settings..."
for f in "$BASE_DIR"/devices/*/deviceinfo "$BASE_DIR"/devices/*/deviceinfo.nokia-leo; do
[ -f "$f" ] || continue
if ! grep -q 'deviceinfo_zram_swap_algo="lz4"' "$f"; then
fail "${f#$BASE_DIR/} no longer selects the lz4 zram algorithm"
fi
done
if ! grep -q 'vm.compaction_proactiveness=0' \
"$BASE_DIR/overlay/rootfs/etc/sysctl.d/99-bananarchy-power.conf"; then
fail "sysctl.d no longer disables proactive compaction"
fi
if ! grep -q 'compaction_proactiveness' \
"$BASE_DIR/overlay/rootfs/etc/local.d/10-power-save.start"; then
fail "10-power-save.start no longer disables proactive compaction"
fi
echo "[check] Docker availability..."
if ! command -v docker >/dev/null 2>&1; then
fail "docker is not installed"