Add modem/networks DWM plugins, Dual-SIM & PIN/PUK support, built-in dmenu views, and game UX fixes
This commit is contained in:
@@ -29,7 +29,7 @@ This manual covers flashing, operating, and customizing **Bananarchy Linux** (Sx
|
||||
- **Patched `sxmo-st` (`st`) with HarfBuzz ligatures & XIM**: patched with `libharfbuzz` (`hb.c`/`hb.h`) shaping (`liga`, `calt`, `clig`, `dlig`) so multi-character programming operators (`->`, `=>`, `!=`, `<=`, `>=`, `===`, `::`, `//`, `/*`) render as continuous ligatures at `pixelsize=18`, alongside full `XIM` (`fcitx5-t9`) input support.
|
||||
- **Patched `sxmo-dmenu` plugin (`dmenu.so` / `dmenu` / `xdmenu`) (`< 2 ms` popup/close)**: preloaded resident DWM plugin rendering a full-screen `240x296` 10-line vertical menu (positioned flush at `Y = 24..320` right below the 24px `dwm` bar, with a `26px` search bar and ten `27px` item rows) with a `#383838` top search bar, `#005577` prompt badge, `#1c1c1c` item list, `XIM` (`XSetLocaleModifiers("")`, `XSetICFocus`, `Xutf8LookupString`) for live `fcitx5-t9` search filtering and `#` mode switching, C-level focus preservation (`prevfocuswin`), built-in `< 0.5 ms` in-place Sxmo menu transitions (`Sys`, `Apps`, `Scripts`, `Modem`, `Config`, `Power`, `St`, `Nano`), and a `/tmp/dwm_plugin_dmenu.sock` IPC server for all `/usr/bin/dmenu` and `sxmo_dmenu.sh` calls.
|
||||
- **Patched `sxmo-dwm` (`dwm`) (`< 2 ms` display wake/unlock & native plugin system)**: configured for `240x320` (`bh = 24`, `#323232` top bar, `#005577` active tag/border, vertical `bstack` layout default, overflow-protected Pango status bar rendering keeping the right-aligned clock always visible, and a transparent-backgrounded bottom desktop softkey bar displaying `"Menu"` and `"Names"` over the wallpaper). Directly polls `/dev/input/by-path/platform-gpio-keys-event` (`SW_LID`) and intercepts locked-state wake keys (`XF86PowerOff`, `XF86PickupPhone`, `XF86KbdLcdMenu1`, `XF86KbdLcdMenu2`) in C to toggle `/sys/class/backlight/backlight/brightness` and `/sys/class/leds/white:kbd_backlight/brightness` in `< 2 ms` before running Sxmo state hooks asynchronously.
|
||||
- **Preloaded DWM plugins (`src/sxmo-dmenu/`, `src/dwm-plugins/` & `src/xdrawer/`, `< 2 ms` FIFO/socket wakeup & unified `.Xresources` theming)**: `dwm` dynamically loads `.so` plugins from `/usr/lib/dwm/plugins/` and `~/.local/lib/dwm/plugins/` (`dmenu.so`, `xdrawer.so`, `dialer.so`, `calllog.so`, `callscreen.so`, `contacts.so`, `sms.so`, `files.so`, `camera.so`, `themes.so`) and preloads them as resident background daemons (`dwm-plugin <name> --preload`) at startup. Each daemon keeps its X11 window, offscreen `Pixmap`, Xft/Pango layouts, and `stat()`-cached Sxmo TSV state initialized in memory while sleeping at 0% CPU on `/tmp/dwm_plugin_<name>.fifo`. Every UI element across `dwm`, `dmenu`, `st`, and all C++ plugins obeys a single unified color and font scheme configured via `~/.Xresources` (`theme.*`, `dwm.*`, `dmenu.*`, `st.*`), with proportional font sizing derived from `theme.baseFontSize` (`12px` / `15px` / `16px` / `18px` at default `15`) and instant live reload via `xthemes`.
|
||||
- **Preloaded DWM plugins (`src/sxmo-dmenu/`, `src/dwm-plugins/` & `src/xdrawer/`, `< 2 ms` FIFO/socket wakeup & unified `.Xresources` theming)**: `dwm` dynamically loads `.so` plugins from `/usr/lib/dwm/plugins/` and `~/.local/lib/dwm/plugins/` (`dmenu.so`, `xdrawer.so`, `dialer.so`, `calllog.so`, `callscreen.so`, `contacts.so`, `sms.so`, `files.so`, `camera.so`, `themes.so`, `modem.so`, `networks.so`) and preloads them as resident background daemons (`dwm-plugin <name> --preload`) at startup. Each daemon keeps its X11 window, offscreen `Pixmap`, Xft/Pango layouts, and `stat()`-cached Sxmo TSV state initialized in memory while sleeping at 0% CPU on `/tmp/dwm_plugin_<name>.fifo`. Every UI element across `dwm`, `dmenu`, `st`, and all C++ plugins obeys a single unified color and font scheme configured via `~/.Xresources` (`theme.*`, `dwm.*`, `dmenu.*`, `st.*`), with proportional font sizing derived from `theme.baseFontSize` (`12px` / `15px` / `16px` / `18px` at default `15`) and instant live reload via `xthemes`.
|
||||
2. **Multi-mode `fcitx5-t9` keypad engine (`src/fcitx5-t9/`)**:
|
||||
- Supports 6 input modes cycled with `#` (`XF86NumericPound`): `abc`, `Abc`, `ABC`, `Sym`, `Ctl`, and `123`, updating the live top-bar status indicator (`[abc]`, `[Abc]`, `[ABC]`, `[Sym]`, `[Ctl]`, `[123]`) in real time.
|
||||
- Locks the candidate popup bar to the bottom of the screen (`X = 1, Y = 290, W = 238, H = 30`) with fixed-width 28-character monospace formatting (`Fira Code 9.5`), so neither the popup window nor individual letters ever jump when cycling through candidates.
|
||||
@@ -141,17 +141,17 @@ You can switch between **vertical stack (`TTT`, `bstack`)**, **horizontal tile (
|
||||
- `Mod4+1`..`4`: switch to workspace tag `1`..`4`
|
||||
- `Mod4+Shift+q`: close focused window
|
||||
|
||||
#### 3.1.2 Preloaded DWM plugins (`DMenu`, `XDrawer`, `Dialer`, `Call Log`, `Call Screen`, `Contacts`, `SMS`, `Files`, `Camera`, `Themes`)
|
||||
All ten core phone overlays are compiled as shared-object plugins (`/usr/lib/dwm/plugins/*.so`), preloaded at `dwm` startup (`dwm-plugin <name> --preload` with an exclusive `/tmp/dwm_plugin_<name>.lock` single-instance guard), and awakened over `/tmp/dwm_plugin_<name>.fifo` in `< 2 ms`:
|
||||
#### 3.1.2 Preloaded DWM plugins (`DMenu`, `XDrawer`, `Dialer`, `Call Log`, `Call Screen`, `Contacts`, `SMS`, `Files`, `Camera`, `Themes`, `Modem`, `Networks`)
|
||||
All twelve core phone overlays are compiled as shared-object plugins (`/usr/lib/dwm/plugins/*.so`), preloaded at `dwm` startup (`dwm-plugin <name> --preload` with an exclusive `/tmp/dwm_plugin_<name>.lock` single-instance guard), and awakened over `/tmp/dwm_plugin_<name>.fifo` in `< 2 ms`:
|
||||
|
||||
1. **`DMenu` (`dmenu.so` / `dmenu` / `xdmenu`) — Zero-Lag System & Context Menus**:
|
||||
- **Open / Close**: Press **Left softkey (`Menu`)** for the **System menu** (`sys`) or **Right softkey (`Back`)** inside an application for its **Context menu** (`ctx`); press the same softkey or `Escape` to close.
|
||||
- **Built-in Native Menus & `< 0.5 ms` In-Place Transitions**: Renders `sys`, `ctx`, `applications` (including **Nano**, **Bantam**, **Files**, **Camera**, **Dialer**, **Contacts**), `scripts`, `modem`, `config`, `power` (with Polkit + `elogind` multi-session **Reboot** and **Poweroff** via `sxmo_power.sh`), `st`, `nano`, `sthotkeys`, and confirmation prompts directly inside the resident `240x296` plugin window without spawning shell scripts or new X11 connections. Submenu transitions (`@menu:...`) and hardware toggles (`@toggle:flashlight`, `@toggle:brightness`, `@toggle:autosuspend`, `@toggle:autocallscreenoff`, `@toggle:bluetooth`) update in place in `< 0.5 ms`.
|
||||
- **Built-in Native Menus & `< 0.5 ms` In-Place Transitions**: Renders `sys`, `ctx`, `applications` (including **Nano**, **Bantam**, **Files**, **Camera**, **Dialer**, **Contacts**), `scripts`, `modem`, `config`, `power` (with Polkit + `elogind` multi-session **Reboot** and **Poweroff** via `sxmo_power.sh`), `audio`, `notifications`, `wm`, `timezone`, `games`, `st`, `nano`, `sthotkeys`, and confirmation prompts directly inside the resident `240x296` plugin window without spawning shell scripts or new X11 connections. Submenu transitions (`@menu:...`) and hardware toggles (`@toggle:flashlight`, `@toggle:brightness`, `@toggle:autosuspend`, `@toggle:autocallscreenoff`, `@toggle:bluetooth`, `@toggle:dnd`) update in place in `< 0.5 ms`.
|
||||
- **Client Socket Mode (`/tmp/dwm_plugin_dmenu.sock`)**: Any script piping items into `/usr/bin/dmenu` or `sxmo_dmenu.sh` streams its item list over the Unix domain socket to the resident `dmenu.so` daemon and receives the user's selection instantaneously, while `/tmp/dwm_plugin_dmenu.active` provides zero-overhead `sxmo_dmenu.sh isopen` checks.
|
||||
|
||||
2. **`XDrawer` (`xdrawer.so` / `xdrawer`) — Global Phone Controls**:
|
||||
- **Open / Close**: Press **both softkeys simultaneously** (`KEY_MENU` + `KEY_BACK`) from anywhere, or select `XDrawer` from the Sxmo menu.
|
||||
- **Controls**: `Up`/`Down` selects a row (**Speaker Volume**, **Earpiece Volume**, **Flashlight**, **Sound**, **Microphone**, **Screen Brightness**, **Keypad Backlight**); `Left`/`Right` adjusts sliders or toggles; `Return` flips toggles; `1`–`7` jumps directly to row `1`–`7`; `Escape` or both softkeys closes the drawer.
|
||||
- **Controls**: `Up`/`Down` selects a row (**Speaker Volume**, **Earpiece Volume**, **Ringer Mode** [`Ring+Vib` / `Vibrate` / `Silent` / `DND`], **Flashlight**, **Sound**, **Microphone**, **Screen Brightness**, **Keypad Backlight**); `Left`/`Right` adjusts sliders or cycles modes/toggles; `Return` flips toggles; `1`–`8` jumps directly to row `1`–`8`; `Escape` or both softkeys closes the drawer.
|
||||
|
||||
3. **`Dialer` (`dialer.so` / `xdialer`) — Keypad Dialer with Contact Integration**:
|
||||
- **Open**: On the empty desktop, press any **`0`–`9`, `*`, or `#` key** (which opens the dialer and immediately inserts that character), or launch **Dialer** from the Sxmo menu or Call Log.
|
||||
@@ -201,6 +201,36 @@ All ten core phone overlays are compiled as shared-object plugins (`/usr/lib/dwm
|
||||
- **Controls & Live Switching**: `Up`/`Down` browses installed themes with live color swatches and typography details; **Center `OK` (`Return`)**, **Call (green)**, or keys **`1`–`9`** immediately writes `~/.Xresources`, runs `xrdb -load ~/.Xresources`, and broadcasts `RELOAD_THEME` to `dwm`, `dmenu`, `st`, and all resident DWM plugins for zero-restart live theme switching.
|
||||
- **Built-in Theme Customizer & Options (`Left softkey` or `*`/`#`)**: Supports **Customize Theme Colors/Font** (`*` shortcut — adjust `Font Face`, `Base Size`, `Main BG`, `Bar BG`, `Header BG`, `Selected BG`, `Selected FG`, `Accent`, `Font Color`, and `Muted Color` with `Left`/`Right` presets or press `Return` to enter any 6-digit `#RRGGBB` hex code via the keypad), **Save Current as New Theme** (`#` shortcut), **Duplicate Theme**, **Edit `.xth` in Nano**, **Reset Default Theme**, and **Delete Theme**, plus CLI `xthemes --apply <ThemeName>` and `xthemes --export-default`.
|
||||
|
||||
11. **`Modem, Dual-SIM & PIN/PUK Manager` (`modem.so` / `xmodem`) — Dual-SIM Slot Provisioning, PIN/PUK Entry & Radio Controls**:
|
||||
- **Open**: Select **Modem** from the Sxmo **System menu** (`Left softkey`), or run `xmodem` (`xmodem unlock`, `xmodem info`, `xmodem log`, `xmodem ussd`). Also opens automatically when the active SIM card is PIN- or PUK-locked (`sxmo_hook_modem.sh`).
|
||||
- **Tabs (`Left`/`Right` or `1` / `2` / `3`)**:
|
||||
- **`1:SIMs` (Dual-SIM & PIN/PUK Management)**: Inspects both physical Qualcomm UIM card slots (`qmicli -pd qrtr://0 --uim-get-card-status` + `/usr/libexec/msm-modem-uim-selection status`), displaying each slot's presence (`PRESENT` / `EMPTY`), active `Primary GW` provisioning badge (`[ACTIVE]`), lock state (`READY`, `PIN-LOCK`, `PUK-LOCK`), remaining PIN1/PUK1 retries, operator, and ICCID. Selecting a slot (`Return` or `Left softkey`) opens the **SIM Slot Actions** menu:
|
||||
- **Activate SIM Slot 1 / 2**: Switches Qualcomm QMI `primary-gw-provisioning` to the chosen physical SIM slot, persists `preferred_sim_slot` in `/etc/conf.d/msm-modem-uim-selection`, and restarts `ModemManager`.
|
||||
- **Unlock SIM PIN**: Masked numeric PIN dialog (`4`–`8` digits, `*` toggles show/hide digits) with live remaining retry counter.
|
||||
- **Unblock SIM with PUK**: Guided 3-step wizard (`8`-digit PUK1 -> new `4`–`8` digit PIN -> confirm new PIN).
|
||||
- **Enable / Disable PIN Lock**: Toggles SIM PIN verification requirement on power-up.
|
||||
- **Change SIM PIN**: Guided 3-step wizard (Current PIN -> New PIN -> Confirm New PIN).
|
||||
- **`2:Radio` (Modem Controls & USSD)**: Displays live signal strength (`%` and visual bar), registration state, access technology (`LTE` / `UMTS` / `GSM`), operator name, IMEI, and phone number, plus interactive rows to **Toggle Modem Monitor**, switch **Network Mode** (`4G/3G/2G`, `3G/2G`, `4G Only`, `3G Only`, `2G Only`), **Send USSD Code** (with keypad entry for `*100#`, etc., and live USSD response display), and **Restart ModemManager**.
|
||||
- **`3:Log` (Modem Log)**: Color-coded history of calls, SMS events, and USSD responses from `$SXMO_LOGDIR/modemlog.tsv`.
|
||||
|
||||
12. **`Networks & Bluetooth Manager` (`networks.so` / `xnetworks` / `xbluetooth`) — Wi-Fi, Cellular APN, Tethering & Bluetooth**:
|
||||
- **Open**: Select **Networks** or **Bluetooth** from the Sxmo **System menu** (`Left softkey`), or run `xnetworks` / `xbluetooth`.
|
||||
- **Tabs (`Left`/`Right` or `1` / `2` / `3`)**:
|
||||
- **`1:Wi-Fi`**: Toggle Wi-Fi radio ON/OFF, scan (`*` or **Rescan Networks**), toggle **Wi-Fi Hotspot**, and browse saved/nearby SSIDs with signal bars, security badges (`WPA2`/`OPEN`), and `[CONNECTED]` status. Selecting an SSID opens **Connect / Switch**, **Enter Password** (multi-tap `abc`/`Abc`/`ABC`/`123`/`Sym` keypad modal with `*` password visibility toggle), **Disconnect**, or **Forget Network**.
|
||||
- **`2:Cell/APN`**: Toggle **Mobile Data** (`sxmo_modemdata.sh`), view current cellular IPv4 address and bearer interface (`wwan0`), edit **APN Configuration** (`APN Name`, `Username`, `Password`, and **Save & Activate APN**), and toggle **USB Tethering**.
|
||||
- **`3:Bluetooth`**: Toggle Bluetooth controller power (`doas rfkill unblock bluetooth` + `bluetoothctl power on/off`), scan for nearby devices (`*` or **Scan Nearby (`8s`)**), and manage paired/discovered devices (**Connect**, **Disconnect**, **Pair & Trust**, **Forget / Remove**).
|
||||
|
||||
#### 3.1.3 Standalone Keypad Games (`Snake` & `Tetris`)
|
||||
Two classic monochrome/Gameboy-styled X11 games (`src/games/snake.cpp` -> `/usr/bin/snake`, `src/games/tetris.cpp` -> `/usr/bin/tetris`) are included in the **Games** submenu (`Left softkey -> Games`):
|
||||
|
||||
1. **`Snake` (`snake`)**:
|
||||
- **Controls**: `2` / `Up`, `8` / `Down`, `4` / `Left`, `6` / `Right` to steer (with a 2-turn input queue and immediate mid-step turn response); `5` / `Return` / `#` / `*` / `P` to pause, resume, or start a new game after Game Over; `BackSpace` / `Right softkey` / `Escape` / `Q` to quit.
|
||||
- **Gameplay**: Wrap-around playfield edges (`24x28` grid) with progressive speed scaling (`+1 px/s` per 5 food eaten) and automatic pause on focus loss.
|
||||
|
||||
2. **`Tetris` (`tetris`)**:
|
||||
- **Controls**: `4` / `Left` and `6` / `Right` to move horizontally; `2` / `Up` to rotate clockwise (with wall kicks); `8` / `Down` for soft drop; `0` / `5` / `Return` / `Space` for hard drop (or resume/new game when paused/game over); `#` / `*` / `P` to pause/resume; `BackSpace` / `Right softkey` / `Escape` / `Q` to quit.
|
||||
- **Gameplay**: 4-shade beveled Gameboy palette, next-piece preview box, score/lines/level/best stats, progressive gravity scaling (`+1 px/s` per 10 lines cleared), and automatic pause on focus loss.
|
||||
|
||||
### 3.2 Multi-mode `fcitx5-t9` keypad reference
|
||||
|
||||
- **Short-press `#`** *(when no character is in preedit)*: cycles through the 6 input modes (`abc` -> `Abc` -> `ABC` -> `Sym` -> `Ctl` -> `123` -> `abc`), displaying a `1500ms` preedit status banner (`[Mode: abc]`, `[Mode: Abc]`, `[Mode: ABC]`, `[Mode: Sym]`, `[Mode: Ctl]`, `[Mode: 123]`).
|
||||
|
||||
Reference in New Issue
Block a user