fix(x11,docs): use busctl+pkcheck for polkit power actions, increase st font to 18px, and format README overview list
This commit is contained in:
@@ -26,7 +26,7 @@ This manual covers flashing, operating, and customizing **Bananarchy Linux** (`v
|
||||
1. **Native 1:1 `240x320` resolution, cross-compiled Xlibre, `Fira Code` ligatures & ultra-low-latency Sxmo X11 UI**:
|
||||
- **Cross-compiled Xlibre (`X11Libre/xserver` 25.2.0)**: compiled specifically for ARMv7 Cortex-A7 (`-O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -fno-plt -fomit-frame-pointer`) with all 3D/GLX/Glamor/VGA/DGA/XVideo bloat stripped out, rootless `elogind` device management, and `modesetting` KMS + `ShadowFB` (`drmModeDirtyFB` partial rectangle SPI updates) with automatic software cursor fallback on `/dev/dri/card0` (`panel-mipi-dbi`).
|
||||
- **Non-Nerd `Fira Code` with OpenType ligatures**: `Fira Code` (`font-fira-code`) is configured as the primary system and terminal font across Fontconfig, Xft, `st`, `dmenu`, `dwm`, `conky`, and `dunst`, with `DejaVu SansM Nerd Font` used strictly as a fallback for Private Use Area icon glyphs.
|
||||
- **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=15`, alongside full `XIM` (`fcitx5-t9`) input support.
|
||||
- **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` (`dmenu`) (`< 15 ms` startup)**: full-width `240x320` 9-line vertical menu (`lineheight = 26`, positioned flush at `Y = 24` right below the 24px `dwm` bar) 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`), and direct Nokia keypad bindings.
|
||||
- **Patched `sxmo-dwm` (`dwm`) (`< 2 ms` display wake/unlock)**: 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). 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.
|
||||
2. **Multi-mode `fcitx5-t9` keypad engine (`src/fcitx5-t9/`)**:
|
||||
|
||||
@@ -6,7 +6,19 @@
|
||||
|
||||
See [The Bananarchy Manifesto](./MANIFESTO.md) for the rationale behind this entire project.
|
||||
|
||||
Bananarchy targets an ultra-lightweight **Sxmo X11 (`sxmo-de-dwm`)** environment (with all Wayland components removed) powered by a cross-compiled **Xlibre (`X11Libre/xserver` 25.2.0)** display server (`modesetting` KMS + `ShadowFB` Damage partial-rectangle SPI transfers, software cursor fallback, rootless `elogind`), **patched `sxmo-dwm`** (`240x320` vertical `bstack` layout, 24px Pango status bar with overflow-protected right-aligned clock, direct C `SW_LID` slider and locked-key wake handling in `< 2 ms`), **patched `sxmo-dmenu`** (`240x320` full-width 9-line vertical menu flush below the 24px top bar with `#383838` search bar, `#005577` prompt badge, and `XIM` `fcitx5-t9` text input in `< 15 ms`), **patched `sxmo-st`** terminal (`pixelsize=15`) with **HarfBuzz (`libharfbuzz`) OpenType ligature shaping** (`liga`, `calt`, `clig`, `dlig`) and `XIM` support, and **non-Nerd `Fira Code` (`font-fira-code`) with ligatures** as the primary system and terminal font (with `DejaVu SansM Nerd Font` used strictly as an icon fallback). It features a sub-95 MB idle RAM footprint on 512 MB devices, full Qualcomm QDSP6/Q6Voice audio (loudspeaker, earpiece speaker, and internal/headset microphones with PM8909 WCD analog codec 2.8V micbias and +6 dB EAR PA gain), GSM/WCDMA/LTE modem routing (`ModemManager` + `q6voiced`), rear 2MP camera support (`msm8905-cam` V4L2 driver for GalaxyCore `GC2395` + MSM8909 `CAMSS` on `/dev/video0` and `bananarchy-photo` CLI/Sxmo app), pre-integrated **Bantam** AI agent (`https://code.luxferre.top/luxferre/bantam-cpp`), a complete on-device development & scripting stack (`git`, `gcc`/`g++`, `make`, `nano`, `janet` + `jpm`, `perl` + `IO::Socket::SSL`, `tcl` + `tcllib`/`tcl-tls`/`sqlite-tcl`, `sqlite`, `i2c-tools`, `v4l-utils`), and a custom **6-mode `fcitx5-t9` input engine** with a fixed bottom candidate bar (`X=1, Y=290, W=238, H=30`) supporting lowercase, one-shot Shift, Caps Lock, all 32 ASCII punctuation symbols, terminal control codes (`^A`-`^Z`, `Esc`, `Tab`, `F1`-`F12`), and direct numeric entry with live top-bar mode indication (`[abc]`, `[Abc]`, `[ABC]`, `[Sym]`, `[Ctl]`, `[123]`).
|
||||
Bananarchy targets an ultra-lightweight **Sxmo X11 (`sxmo-de-dwm`)** environment (with all Wayland components removed), featuring:
|
||||
|
||||
- **Cross-compiled Xlibre (`X11Libre/xserver` 25.2.0) display server**: `modesetting` KMS + `ShadowFB` Damage partial-rectangle SPI transfers, software cursor fallback, and rootless `elogind` integration.
|
||||
- **Patched `sxmo-dwm`**: `240x320` vertical `bstack` layout, 24px Pango status bar with an overflow-protected right-aligned clock, and direct C `SW_LID` slider and locked-key wake handling in `< 2 ms`.
|
||||
- **Patched `sxmo-dmenu`**: `240x320` full-width 9-line vertical menu flush below the 24px top bar with a `#383838` search bar, `#005577` prompt badge, and `XIM` `fcitx5-t9` text input in `< 15 ms`.
|
||||
- **Patched `sxmo-st` terminal (`pixelsize=18`)**: **HarfBuzz (`libharfbuzz`) OpenType ligature shaping** (`liga`, `calt`, `clig`, `dlig`) and `XIM` support.
|
||||
- **Typography**: non-Nerd **`Fira Code` (`font-fira-code`) with ligatures** as the primary system and terminal font (with `DejaVu SansM Nerd Font` used strictly as an icon fallback).
|
||||
- **Custom 6-mode `fcitx5-t9` input engine**: fixed bottom candidate bar (`X=1, Y=290, W=238, H=30`) with a constant 28-character monospace preedit layout supporting lowercase, one-shot Shift, Caps Lock, all 32 ASCII punctuation symbols, terminal control codes (`^A`-`^Z`, `Esc`, `Tab`, `F1`-`F12`), and direct numeric entry with live top-bar mode indication (`[abc]`, `[Abc]`, `[ABC]`, `[Sym]`, `[Ctl]`, `[123]`).
|
||||
- **Low memory footprint**: sub-95 MB idle RAM usage on 512 MB devices.
|
||||
- **Full Qualcomm QDSP6/Q6Voice audio & modem routing**: loudspeaker, earpiece speaker, and internal/headset microphones with PM8909 WCD analog codec 2.8V micbias, +6 dB EAR PA gain, and GSM/WCDMA/LTE voice routing (`ModemManager` + `q6voiced`).
|
||||
- **Rear 2MP camera support**: `msm8905-cam` V4L2 driver for GalaxyCore `GC2395` + MSM8909 `CAMSS` on `/dev/video0` and the `bananarchy-photo` CLI/Sxmo app.
|
||||
- **Pre-integrated Bantam AI agent**: cross-compiled from `https://code.luxferre.top/luxferre/bantam-cpp`.
|
||||
- **Complete on-device development & scripting stack**: `git`, `gcc`/`g++`, `make`, `nano`, `janet` + `jpm`, `perl` + `IO::Socket::SSL`, `tcl` + `tcllib`/`tcl-tls`/`sqlite-tcl`, `sqlite`, `i2c-tools`, and `v4l-utils`.
|
||||
|
||||
The current Bananarchy version is `v0.0.1`.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ dwm.selbgcolor: #005577
|
||||
dwm.selbordercolor: #005577
|
||||
dwm.selfgcolor: #ffffff
|
||||
|
||||
st.font: Fira Code:pixelsize=13:antialias=true:autohint=true
|
||||
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
|
||||
st.background: #1c1c1c
|
||||
st.foreground: #e5e5e5
|
||||
st.cursorColor: #cccccc
|
||||
|
||||
@@ -15,7 +15,7 @@ dwm.selbgcolor: #005577
|
||||
dwm.selbordercolor: #005577
|
||||
dwm.selfgcolor: #ffffff
|
||||
|
||||
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true
|
||||
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
|
||||
st.background: #1c1c1c
|
||||
st.foreground: #e5e5e5
|
||||
st.cursorColor: #cccccc
|
||||
|
||||
Binary file not shown.
@@ -14,18 +14,29 @@ usage() {
|
||||
run_polkit_login1() {
|
||||
method="$1"
|
||||
python3 - "$method" <<'PYEOF' >/dev/null 2>&1
|
||||
import os, pty, sys
|
||||
import os, pty, select, sys
|
||||
method = sys.argv[1]
|
||||
if method == "Reboot":
|
||||
acts = "org.freedesktop.login1.reboot org.freedesktop.login1.reboot-multiple-sessions org.freedesktop.login1.reboot-ignore-inhibit"
|
||||
else:
|
||||
acts = "org.freedesktop.login1.power-off org.freedesktop.login1.power-off-multiple-sessions org.freedesktop.login1.power-off-ignore-inhibit"
|
||||
cmd = (
|
||||
"pkttyagent --process $$ & AG=$!; sleep 0.15; "
|
||||
"dbus-send --system --print-reply --dest=org.freedesktop.login1 "
|
||||
"/org/freedesktop/login1 org.freedesktop.login1.Manager." + method + " boolean:true; "
|
||||
"RC=$?; kill $AG 2>/dev/null; exit $RC"
|
||||
"for act in " + acts + "; do "
|
||||
"pkcheck --action-id $act --process $$ -u >/dev/null 2>&1 || true; "
|
||||
"done; "
|
||||
"kill $AG 2>/dev/null || true; "
|
||||
"exec busctl call --allow-interactive-authorization=true "
|
||||
"org.freedesktop.login1 /org/freedesktop/login1 "
|
||||
"org.freedesktop.login1.Manager " + method + " b true"
|
||||
)
|
||||
pid, fd = pty.fork()
|
||||
if pid == 0:
|
||||
os.execlp("sh", "sh", "-c", cmd)
|
||||
while True:
|
||||
r, _, _ = select.select([fd], [], [], 3.0)
|
||||
if not r:
|
||||
break
|
||||
try:
|
||||
d = os.read(fd, 1024)
|
||||
if not d:
|
||||
|
||||
@@ -15,7 +15,7 @@ dwm.selbgcolor: #005577
|
||||
dwm.selbordercolor: #005577
|
||||
dwm.selfgcolor: #ffffff
|
||||
|
||||
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true
|
||||
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
|
||||
st.background: #1c1c1c
|
||||
st.foreground: #e5e5e5
|
||||
st.cursorColor: #cccccc
|
||||
|
||||
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
static char *font = "Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true";
|
||||
static char *font = "Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true";
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
static char *font = "Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true";
|
||||
static char *font = "Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true";
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user