Add ringtones/wallpapers plugins, AT console, dialer USSD/*#06#, and SIM icon fix

This commit is contained in:
Luxferre
2026-10-24 19:58:11 +03:00
parent e549aaf413
commit dc59704547
64 changed files with 2743 additions and 130 deletions
+22 -8
View File
@@ -141,8 +141,8 @@ 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`, `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`:
#### 3.1.2 Preloaded DWM plugins (`DMenu`, `XDrawer`, `Dialer`, `Call Log`, `Call Screen`, `Contacts`, `SMS`, `Files`, `Camera`, `Themes`, `Modem`, `Networks`, `Ringtones`, `Wallpapers`)
All fourteen 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.
@@ -153,9 +153,12 @@ All twelve core phone overlays are compiled as shared-object plugins (`/usr/lib/
- **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**, **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**:
3. **`Dialer` (`dialer.so` / `xdialer`) — Keypad Dialer with Contact, USSD & `*#06#` 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.
- **Dialing & T9 Filtering**: Typing digits filters saved contacts (`~/.config/sxmo/contacts.tsv`) and recent numbers (`modemlog.tsv`) by phone number and T9 contact name in real time. Hold **`0`** (`>= 420 ms`) or press **D-Pad `Right`** / **Left softkey (`+Sign`)** to insert `+`.
- **Direct USSD Codes & `*#06#` Dual-SIM IMEI Display**:
- Typing **`*#06#`** immediately opens the **Device IMEI (`*#06#`)** modal showing both **`IMEI 1 (SIM Slot 1)`**, **`IMEI 2 (SIM Slot 2)`**, and **`IMEI SV`**.
- Typing any USSD / MMI code (`*...#` or `#...#`, e.g., `*100#`) switches the center softkey to **`SEND`**. Pressing **Call (green)** or **Center `OK` (`Return`)** sends the USSD request directly and opens an in-dialer **USSD Session Modal** with scrollable response text and an interactive reply input box for multi-step carrier menus.
- **Navigation & Calling**: `Up`/`Down` selects a matching contact or recent number; **Call (green)** or **Center `OK` (`Return`)** places the call immediately; **Right softkey (`Clear` / `Close`)** or **`BackSpace`** deletes digits or closes the dialer; **Left softkey (`Call Log`)** when empty switches directly to the Call Log.
4. **`Call Log` (`calllog.so` / `xcalllog`) — Call History Viewer**:
@@ -201,17 +204,18 @@ All twelve core phone overlays are compiled as shared-object plugins (`/usr/lib/
- **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`)**:
11. **`Modem, Dual-SIM & PIN/PUK Manager` (`modem.so` / `xmodem`) — Dual-SIM Slot Provisioning, PIN/PUK Entry, Radio & AT Console**:
- **Open**: Select **Modem** from the Sxmo **System menu** (`Left softkey`), or run `xmodem` (`xmodem unlock`, `xmodem info`, `xmodem at`, `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` / `4`)**:
- **`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`.
- **`2:Radio` (Modem Controls & USSD)**: Displays live signal strength (`%` and visual bar), registration state, access technology (`LTE` / `UMTS` / `GSM`), operator name, both `IMEI 1` and `IMEI 2`, and phone number, plus interactive rows to switch **Network Mode** (`4G/3G/2G`, `3G/2G`, `4G Only`, `3G Only`, `2G Only`), **Send USSD Code**, toggle **Modem Power**, and **Restart ModemManager**.
- **`3:AT` (Direct AT Command Console)**: Send any AT command directly to the Qualcomm modem (`/dev/wwan0at1` / `/dev/wwan0at0`) and view the multi-line response in real time. Supports multi-tap AT command entry (`[ABC]`/`[abc]`/`[123]`/`[Sym]`, `#` cycles mode, `*` inserts `+?=,",;*#`), a quick preset selector (`AT`, `ATI`, `AT+CGSN`, `AT+CSQ`, `AT+CREG?`, `AT+COPS?`, `AT+CPIN?`, `AT+CCID`, `AT+CGDCONT?`, `AT+CGPADDR`, `AT+CFUN?`, `AT+CLCC`), and scrollable output.
- **`4: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`.
@@ -220,6 +224,16 @@ All twelve core phone overlays are compiled as shared-object plugins (`/usr/lib/
- **`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**).
13. **`Ringtones & Ringer Manager` (`ringtones.so` / `xringtones`) — Ringtone Browser, Live Preview & Ringer Settings**:
- **Open**: Select **Ringtones** from the **Config**, **Audio**, or **Apps** menu, or run `xringtones`.
- **Tabs (`Left`/`Right` or `1` / `2`)**:
- **`1:Ringtones`**: Lists built-in synthesized ringtones (`/usr/share/sxmo/ringtones/*.wav` and `/usr/share/sxmo/ring.ogg`) alongside user audio files in `~/Ringtones/` and `~/Music/`. Press **`*`** or **Left softkey (`Play` / `Stop`)** to preview any ringtone live via `mpv`, and press **`Return` (`Set Ring`)** to save it as the active incoming call ringtone (`~/.config/sxmo/ringtone`).
- **`2:Settings`**: Adjust **Ringer Mode** (`Ring + Vibrate`, `Ring Only`, `Vibrate Only`, `Silent`), **Ring Duration** (`10s`–`60s`), **Ring Loop Count** (`3x`–`50x`), **Vibrate Strength** (`Level 1`–`3`), and **Test Vibration** (`~/.config/sxmo/ringsettings`).
14. **`Desktop Wallpaper Manager` (`wallpapers.so` / `xwallpapers` / `xbackground`) — Live Preview & Wallpaper Selector**:
- **Open**: Select **Wallpapers** from the **Config** or **Apps** menu, or run `xwallpapers` / `xbackground`.
- **Controls**: Browses system wallpapers (`/usr/share/wallpapers/`) and user photos (`~/Pictures/Wallpapers/` and `~/Pictures/`) with a live decoded portrait thumbnail, image resolution, and file size. Press **`Left` / `Right`** (or `#`) to cycle the scaling mode (`Fill (Crop)`, `Scale (Stretch)`, `Fit (Max)`, `Center (1:1)`, `Tile`), press **`*`** or **Left softkey (`View [*]`)** to toggle a full-screen preview, and press **`Return` (`Apply`)** to apply the wallpaper immediately via `feh` and persist it in `~/.config/sxmo/wallpaper`.
#### 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`):