CI / test (push) Canceled after 0s
- Add compositor/shell/backlight.mbt for backlight control in the shell - Update wit/capabilities.wit and wit/host/plasmoids.wit, then regenerate the component and interface ffi.mbt bindings (mostly export reordering) - Add world/launcher-widget/README.md
5.4 KiB
5.4 KiB
Handset & Touch Support
Chandra includes KMS/libinput/compositor adaptations tailored for mainline Linux smartphones (verified on OnePlus 6T oneplus,fajita at 1080x2340).
Display Scaling (CHANDRA_SCALE)
- Integer scaling lives in
compositor/kms/kms_stub.c. - Setting
CHANDRA_SCALE=N(or the default automatic2xscaling on dense portrait phone panels such as1080x2340) runs the compositor at a legible540x1170logical resolution while presentingNxnearest pixels to hardware dumb buffers and cursor planes.
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 within540pxportrait 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, a stationary touch held for500 msconverts to a synthetic right-click (BTN_RIGHT) via atimerfd, allowing context menus and secondary actions without a mouse. - Built-in OSK:
compositor/host/osk.mbtprovides 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-rightKBpill.
Display Rotation, Flip, and Auto-Rotate
- 4-way transform (
0°,90° CW,180°,270° CW): Handled end-to-end acrosscompositor/kms/kms_stub.c,wit/host/display.wit,wasmhost/bin/display.mbt, and the compositor event loop (CHANDRA_ROTATEsets the initial orientation). Both scanout rows and libinput touch/pointer coordinates transform to match the active orientation. - Touch
Rotpill: Sitting left of theKBpill incompositor/host/osk.mbt:- Tap: rotate
90°clockwise (0 -> 90 -> 180 -> 270 -> 0). - Long-press / right-click: flip
180°(0 <-> 180,90 <-> 270).
- Tap: rotate
- CLI control:
chandra-ctl rotate [cw|ccw|flip|0|90|180|270|status]queries or changes rotation live (0portrait,90/270landscape,180inverted). - Sensor auto-rotate: When running on the DRM backend (
chandra-session) withmonitor-sensor(iio-sensor-proxy) installed,session/chandra-auto-rotateruns inside the activeseat0session and applies orientation change events (normal -> 0,right-up -> 90,bottom-up -> 180,left-up -> 270) without fighting manualRottaps while stationary. SetCHANDRA_AUTO_ROTATE=0in the session environment to disable auto-rotate.
Client-Side Window Controls (Chromium / GTK)
compositor/wayland/server.mbtemitsxdg_toplevel.wm_capabilities(window_menu,maximize,fullscreen,minimize) forxdg_wm_basev5+ clients so client-decorated apps expose Maximize alongside Close.- On GTK/Chromium setups where GNOME defaults (
org.gnome.desktop.wm.preferences button-layout) omit maximize/minimize (e.g.'appmenu:close'), configure GTK andgsettings:~/.config/gtk-3.0/settings.iniand~/.config/gtk-4.0/settings.ini:gtk-decoration-layout=:minimize,maximize,closegsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'
Keyring Unlock
session/chandra-sessionstartsgnome-keyring-daemon --start --components=secretsand unlocks an unencrypted defaultlogin.keyringat login over D-Bus (org.freedesktop.Secret.Service.Unlock) so apps such as Chromium store credentials without blocking prompts.
Power Button & Brightness
- Power key blank/wake: Pressing
KEY_POWER(116) incompositor/host/compositor.mbttoggles manual screen blanking (DPMSoff/on + touch cancellation incompositor/kms/kms_stub.c) while ignoring stray touches during blanking. Also controllable viachandra-ctl screen [on|off|toggle|status]. (SetHandlePowerKey=ignorein/etc/systemd/logind.conf.d/sologinddoes not power off immediately.) - Settings Brightness slider:
compositor/shell/backlight.mbtreads/sys/class/backlight/(ae94000.dsi.0,CHANDRA_BACKLIGHToverride) and writes changes via sysfs ororg.freedesktop.login1.Session.SetBrightness. When a backlight device exists, Settings > Power > Brightness shows a-/ slider /+control (5%..100%), also accessible viachandra-ctl brightness [PCT|status].
Face Unlock (libcamera)
- On phones whose MIPI sensors (
imx371,imx519,imx376) requirelibcameraSoftISP rather than raw V4L2 nodes,face/chandra-facesupportslibcamera:<camera-id>entries viapython-libcameraand applieslibcamera.properties.Rotation.face/install.pysupports--system-pythonto run with systempython-opencv+python-numpyonaarch64, andface/polkit-agent-helper.confgrantschar-video4linux,char-media, andchar-dma_heapaccess to polkit's helper sandbox.