Add two standalone X11 games (not DWM plugins) for the Nokia 8110 keypad:
- src/games/snake.cpp: Nokia Snake II-style game, 240x296, built-in 5x7 font
- src/games/tetris.cpp: Tetris with next-piece preview, levels, line clears
Both float as dialog windows in dwm, use a self-contained bitmap font (no
font-file dependency), and are controlled via the numeric keypad (2/4/6/8
directions, 5 action) with arrow-key fallbacks.
- scripts/build-games.sh: Docker armv7 cross-compile (mirrors build-sxmo-x11.sh)
- overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_games.sh: Games menu hook
- overlay/rootfs/usr/bin/sxmo_appmenu.sh: add 'Games' entry after 'Apps' and a
games submenu case
Binaries committed to prebuilt/games and overlay/rootfs/usr/bin per repo
convention. Deployed and verified on the live device (window maps, dwm focuses
it, keypad input reaches the game).
The previous commit disabled sxmo_idle.sh and the idle_locker in the
unlock/lock hooks, leaving the display backlight pinned at maximum
brightness forever (Xorg runs with -s 0 -dpms and /sys/power/state is
empty, so the panel never blanks). On a phone with no suspend this is by
far the dominant battery drain.
Restore sxmo_idle.sh and start idle_locker from the unlock and lock hooks
so the screen blanks after SXMO_UNLOCK_IDLE_TIME (default 30s) / once
locked after SXMO_LOCK_IDLE_TIME (default 8s). Locking itself stays
explicit-only, matching the documented design; only the display blanks.
Verified live on the device: after the idle timeout the state transitions
to screenoff and /sys/class/backlight/backlight/brightness drops to 0.
SXMO_OS is always bananarchy (an Alpine derivative) on this device, so
the SXMO_OS case, the change_systemd branch, and the nixos branch were
dead code. Drop them and always run the Alpine flow
(doas setup-timezone -z), which is what bananarchy uses.
Text-input dialogs (Wi-Fi SSID/Passphrase, search queries, config
prompts, etc.) invoke dmenu with -p but never -t, so the XIM/fcitx
routing that was gated solely by use_text_input was never enabled and
fcitx never activated on dmenu input; on the numeric keypad only raw
digits could be entered, making the dialogs non-functional.
Decouple the fcitx/IME routing from the -t flag via a new engage_ime
flag (default on) while keeping use_text_input for its output/selection
semantics, and skip routing Enter to fcitx when a menu list is present
so menu selection is never stolen by the T9 commit. XFilterEvent already
returns False when fcitx is toggled off via the mode switcher, so the
dialogs now respect the Fcitx mode switcher automatically.