Lock: add session lock from power button and chandra-ctl lock
CI / test (push) Waiting to run

- Lock the session from the power button or `chandra-ctl lock`
- Unlock with a face or the password; the password always works
- Add compositor lock module with tests, and a polkit unlock policy (org.chandra.unlock)
- Document the lock flow in docs/lock.md and link it from the README
- Add generated interface bindings for the compositor and widget components
This commit is contained in:
nandi committed 2026-11-29 03:24:46 -08:00
1 parent 7501fc3ad9
commit c790f96e58
131 files changed
+4693 -274

No files matched your search

+3 -5
View File
@@ -10,19 +10,17 @@ Chandra includes KMS/libinput/compositor adaptations tailored for mainline Linux
## Icon Desktop & Compact Panel
- **Icon desktop default:** Portrait handset layouts prioritize the touch-friendly icon desktop launcher aesthetic.
- **Compact panel layout:** Panel items (`launcher`, `dock`, `session-settings`, `network`, `battery`, `clock-digital`, `screenshot`) size compactly so all controls fit cleanly within `540px` portrait width without clipping, with fuel-gauge support (e.g. `bq27411-0`).
- **Compact panel layout:** Panel items (`launcher`, `dock`, `session-settings`, `network`, `battery`, `clock-digital`, `screenshot`, `rotate`, `osk`) size compactly so all controls fit cleanly within `540px` portrait width without clipping, with fuel-gauge support (e.g. `bq27411-0`).
## Touch Input & On-Screen Keyboard
- **Long-press right-click:** In [`compositor/kms/kms_stub.c`](../compositor/kms/kms_stub.c), a stationary touch held for `500 ms` converts to a synthetic right-click (`BTN_RIGHT`) via a `timerfd`, allowing context menus and secondary actions without a mouse.
- **Built-in OSK:** [`compositor/host/osk.mbt`](../compositor/host/osk.mbt) provides a 5-row virtual keyboard that opens automatically when Wayland text input (`zwp_text_input_v3`) gains focus and can also be toggled manually from the bottom-right **`KB`** pill. It sits directly above the panel, so the panel stays visible and usable while typing (a strict kiosk has no panel: there it reaches the bottom edge).
- **Built-in OSK:** [`compositor/host/osk.mbt`](../compositor/host/osk.mbt) provides a 5-row virtual keyboard that opens automatically when Wayland text input (`zwp_text_input_v3`) gains focus and can also be toggled manually from the **`KB`** (`osk`) panel module. It sits directly above the panel, so the panel stays visible and usable while typing (a strict kiosk has no panel: there it reaches the bottom edge).
## Display Rotation, Flip, and Auto-Rotate
- **4-way transform (`0°`, `90° CW`, `180°`, `270° CW`):** Handled end-to-end across [`compositor/kms/kms_stub.c`](../compositor/kms/kms_stub.c), [`wit/host/display.wit`](../wit/host/display.wit), [`wasmhost/bin/display.mbt`](../wasmhost/bin/display.mbt), and the compositor event loop (`CHANDRA_ROTATE` sets the initial orientation). Both scanout rows and libinput touch/pointer coordinates transform to match the active orientation.
- **Touch `Rot` pill:** Sitting left of the `KB` pill in [`compositor/host/osk.mbt`](../compositor/host/osk.mbt):
- **Tap:** rotate `90°` clockwise (`0 -> 90 -> 180 -> 270 -> 0`).
- **Long-press / right-click:** flip `180°` (`0 <-> 180`, `90 <-> 270`).
- **Touch `Rot` (`rotate`) panel module:** Sits in the panel beside `KB` (`osk`) and rotates `90°` clockwise on tap (`0 -> 90 -> 180 -> 270 -> 0`). Both `rotate` and `osk` are ordinary panel modules that can be reordered, removed, or added on any desktop from **Settings > Panel**.
- **CLI control:** `chandra-ctl rotate [cw|ccw|flip|0|90|180|270|status]` queries or changes rotation live (`0` portrait, `90` / `270` landscape, `180` inverted).
- **Sensor auto-rotate:** When running on the DRM backend (`chandra-session`) with `monitor-sensor` (`iio-sensor-proxy`) installed, [`session/chandra-auto-rotate`](../session/chandra-auto-rotate) runs inside the active `seat0` session and applies orientation change events (`normal -> 0`, `right-up -> 90`, `bottom-up -> 180`, `left-up -> 270`) without fighting manual `Rot` taps while stationary. Set `CHANDRA_AUTO_ROTATE=0` in the session environment to disable auto-rotate.