f556df2f4b39f1540d68343d8b559e1161544c42
86
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f556df2f4b |
Gamerig Library: gamerig's game library as a Chandra desktop module
CI / test (push) Successful in 2m25s
- New desktop module gamerig-library (components/gamerig-library, logic in lib/gamelib): the layout of gamerig's web library (desktop/ui) in draw ops. Top bar with the Gamerig mark, app count and search; sidebar with categories and counts, running apps (switch to, stop) and rig status (GPU, display, audio); card grid with featured games two columns wide, icon tiles, category and status badges, description, install hint, Launch / Big Picture / Switch to / Stop. Typing filters, arrows + Enter launch, the wheel scrolls. Colours: follow desktop, dark, light. - New game-library capability: tables 26-28 (status, games, launch modes), request 45, in the wasmer/wasmtime stub, the MoonBit wasmhost and the Rust host-wasm. - compositor/shell/gamelib.mbt polls GET $GAMERIG_DESKTOP_API/api/state (default http://127.0.0.1:8091) every 2 s with curl on a socket and POSTs launch/stop/focus; a file:// base reads a state file (tests). - --desktop NAME picks what fills the desktop at start. scripts/gamerig-kiosk.sh now runs a hybrid kiosk with the library as the desktop (CHANDRA_KIOSK_MODE=strict for the old one). - Tests: lib/gamelib, compositor/host/gamelib_test.mbt, a host-wasm test; docs/gamerig-library.md with a screenshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE |
||
|
|
fa932f9ac0 |
GTK windows (Gajim, GNOME apps) resize from their shadow and all four edges
CI / test (push) Successful in 3m44s
GTK draws no border, only a shadow, and resizes only from a press in that shadow, which Chandra never hands to the client. Chandra's own zones were ~4px wide around the visible edge and there was none on the top edge, so Gajim (GTK 4) looked unresizable. Client-decorated windows now get zones that reach up to 12px into the shadow (GTK's own handle size, at least 6px) plus 3px over their edge, with 16px corners, top edge included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiu4r7mEXBdKY6cgv6 |
||
|
|
b4f7149c72 |
Kiosk: --kiosk-hybrid keeps the desktop and locks only leaving the session
CI / test (push) Successful in 3m49s
Panel, launcher, dock, desktop module and shortcuts stay; Log out and power actions are refused while locked. Admin escape and chandra-ctl kiosk work as in the strict kiosk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE |
||
|
|
f0c39757d7 |
GTK 3 windows get Chandra's frame: org_kde_kwin_server_decoration
CI / test (push) Successful in 12m52s
GTK 3 has no xdg-decoration support, so every GTK 3 window without its own header bar (Webby, Nemo-style apps) drew GTK's fallback title bar: a centered title, only a close button, and a dark border inside Chandra's CSD box. GTK 3 asks for server-side decoration through KWin's org_kde_kwin_server_decoration instead. Chandra now advertises it with default mode Server; request_mode(Client) (GTK 3 apps with a header bar) keeps their own frame. The Settings portal also answers org.gnome.desktop.wm.preferences button-layout "appmenu:minimize,maximize,close", so apps that still draw their own title bar show the same three buttons as Chandra's frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hghaEWWsCBgEq6iZHj |
||
|
|
9f7489cfea |
Face unlock window: live camera preview, Snap, thumbnails, one password on Apply
CI / test (push) Failing after 12m30s
Settings > Session "Add or remove faces…" (and "Remove…" on a face) opens a compositor-drawn Face unlock window instead of running root steps one by one: - chandra-face camera runs as the user (no password): it streams a small live picture with the face box and a cropped thumbnail per snap; the snaps' embeddings stay in that process, nothing is written to disk. - Click a snap to drop it; mark saved faces Remove/Keep. - Apply saves the snaps as one face and removes the marked ones in one root `chandra-face apply` (JSON on stdin, validated) through run0/pkexec: one password prompt. - New raster host function image-pixels (host-wasm, wasmhost, native) for the window's pictures. Tests: camera session and apply in face/test_face.py; the window end to end against a fake tool in compositor/host/face_test.mbt. Docs explain why the change itself still needs root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf |
||
|
|
0a9787ae36 |
Chrome's own frame: honor zxdg_toplevel_decoration_v1.set_mode(client_side)
CI / test (push) Successful in 2m18s
Chrome with "Use system title bar and borders" off, and its installed web apps (PWAs), ask for client-side decoration. Chandra always answered server-side, and Chrome kept drawing its own title bar and shadow anyway (window geometry 10px in), so Chandra's title bar showed above Chrome's with Chrome's shadow as a gap. Now a client asking for client_side gets it and is framed like a GTK window (ToplevelFrame client_side); unset_mode or server_side keep Chandra's frame. Checked with Chromium 158 on Ozone Wayland, headless. Test in csd_test.mbt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hkfW5ttNd831XmdsC5 |
||
|
|
d521d0d840 |
Kiosk mode: --kiosk CMD runs one fullscreen app, locked down, restarted when it exits
CI / test (push) Successful in 4m10s
No panel, no compositor shortcuts or desktop menus, the focused window fullscreen (dialogs float), CMD restarted with backoff. Ctrl+Alt+Shift+Escape or chandra-ctl kiosk lock|unlock|status for admin work. --app-id sets the X11 WM_CLASS / Wayland app id of Chandra's own window. scripts/gamerig-kiosk.sh runs Chandra as a gamerig rig's library window on its NVIDIA Xorg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE |
||
|
|
4920f505e5 |
dock test: don't expect LibreOffice's catalog name (CI has no .desktop for it)
CI / test (push) Successful in 2m18s
The menu title is the app's catalog name, which is just the id on a machine without libreoffice-writer.desktop. The window rows check is enough. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiPCFHRxaJQvwex6ry |
||
|
|
ae48cc5bf4 |
Applications menu and Icon Desktop: show each app's .desktop icon
CI / test (push) Failing after 2m56s
The launcher's rows drew a letter circle and the Icon Desktop fell back to letter tiles for every app that wasn't in the dock: the shell only published icons for windows' and dock apps. publish_icons now also covers the rows the open Applications menu lists (only those, so opening it looks up a handful of icons) and every catalog app when the desktop module imports icons. Lookups are the dock's (theme chain, absolute Icon= paths, PNG on the native host, SVG too on the wasm host, generic app icon, then the letter tile) and cached per id; an unchanged icons table is no longer re-sent every frame. launcher-widget imports icons; the JS host has an icons stub (always 0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hkhaM5djqPXPQNs7QR |
||
|
|
71f0b858d6 |
Smoother animations without a GPU: faster rasteriser, frame pacing, software/hardware mode
CI / test (push) Failing after 3m2s
Measured headless at 1920x1080 with CHANDRA_FRAME_TRACE (new: one log line per drawn frame): - Overview open: 46 -> 62 fps, worst frame gap 69 -> 36 ms, raster 14 -> 5 ms a frame. - Live Starfield: 19 -> 30 fps (its target), raster 49 -> 13 ms, CPU 97% -> 46%. Rasteriser (MoonBit host; circles and previews also in the Rust host): - Blending works on two channels at a time in 16-bit lanes with an exact /255: same pixels, about 3x quicker on big translucent fills (the overview's dim, the starfield's nebulae). - Filled circles are drawn as row spans, rings skip their empty middle (a sqrt per pixel of the bounding box before). Same pixels; a Rust test checks it against the old loop. - Window previews gliding in the overview are sampled straight from the preview at each frame's size instead of filtered and cached at a size used once; the MoonBit host also gets the one-large-size cache and 4096 px draw limit the Rust host had (it kept every size and didn't draw previews past 1024 px). - Image scaling sums each output row's columns once, with 32-bit sums and division. Frame pacing: frames are drawn only when the output can take them (no page flip in flight on KMS; the previous frame shown nested and on X11), with a frame every 250 ms for an output that never gets ready. The KMS loop runs at 125 Hz, so animations used to rasterise frames that were never shown. Software or hardware mode (compositor/shell/render_mode.mbt, docs/rendering.md): detected from the DRM render nodes' drivers (and NVIDIA's proprietary driver, LIBGL_ALWAYS_SOFTWARE), overridden by CHANDRA_RENDER=software|hardware or Settings > Session "Lighter animations" (state.edn :render, saved only when it differs from what was detected). Software mode remakes changing previews every 200 ms instead of 100 ms and caps desktop modules at ~30 fps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hkTQp5uN5FtwpzrXUA |
||
|
|
01bd8281d5 |
Dock: plain icons always come before the task pills
CI / test (push) Failing after 2m33s
With window titles on, a pinned app that was running drew as a pill in its pin slot, so idle pinned icons ended up between pills. Now the dock shows the pinned apps that aren't running first, then every task: running pinned apps in pin order, then the other running apps. The divider sits between the two groups. Squeezing the pills to icons keeps the order; with titles off the plain pinned order stays. Move left / right in the menu follow the pin list, not the shown position. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiPCFHRxaJQvwex6ry |
||
|
|
3e35c4dfa5 |
One install recipe: just install installs everything
CI / test (push) Successful in 2m25s
just install now builds as you, then asks for root once and installs the whole thing: the login session (wasm compositor on the MoonBit host, modules, chandra-ctl, KDE colors, portal) and face unlock (helper, PAM module, config, models). The alternatives are flags instead of recipes: --link (was install-dev), --rust (install-rust), --native (install-native), --pam (install-face --pam), --no-face, --no-models. The PAM module is compiled as you into build/, so root only copies it; without a compiler or libpam headers face unlock is skipped with a warning. just uninstall removes face unlock too (--purge: enrolled faces). Removed: install-dev, install-rust, install-native, install-face, uninstall-face and the old install-session* / uninstall-session aliases. New docs/install.md; README, docs and installer hints updated. Also drops a committed __pycache__ file and ignores __pycache__/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hkA52AocBmJHipFRqb |
||
|
|
90fdda2455 |
Client-drawn window frames: GTK apps (GNOME Files) get no second title bar
CI / test (push) Successful in 2m57s
GTK never asks for server-side decoration (it has no xdg-decoration support), so it draws its own header bar plus a transparent shadow margin around it, and says where the real window is with xdg_surface.set_window_geometry. Chandra drew its Breeze frame around every window anyway and blitted the whole buffer from the frame's corner: a second title bar on top, and the content shifted down/right by the shadow (a see-through gap), with the right/bottom cut off. - The server reports per window who draws the frame (ToplevelFrame: client-side when the client never made a zxdg_toplevel_decoration_v1, plus the window-geometry offset). - A client-decorated window gets no Chandra frame and fills the frame's whole box (HostWindow::client_rect): it is configured for that size, drawn with its buffer shifted by the geometry offset (its own shadow drawn around it), and pointer coordinates and popup placement use the same origin. Tiling, title-bar hit areas and resize zones are unchanged. - xdg_toplevel.move / resize (dragging a header bar, a CSD border) start Chandra's move and resize drags; they were ignored before. - Tiled windows get the tiled_left/right/top/bottom states, so GTK drops its shadow and rounded corners there. Checked with real Nautilus 46 and gtk4-demo on the headless native compositor. Tests: compositor/host/csd_test.mbt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hkfW5ttNd831XmdsC5 |
||
|
|
b097116ded |
Face unlock: Python, OpenCV and numpy from a root-owned pixi environment
CI / test (push) Successful in 2m41s
- face/pixi.toml + pixi.lock (python 3.12, numpy, opencv-python-headless). `just install-face` passes the pixi on your PATH; install.py runs `pixi install --frozen` as root into /usr/local/lib/chandra/face-env (not the checkout's .pixi: the PAM module runs this Python as root, so it must not be user-writable), writes the helper's shebang for it and builds the PAM module with it as the default python. No python3-opencv needed; uninstall removes the env. - The PAM module now also refuses a Python that isn't root's; group-writable is accepted only for group root (conda/pixi files are 0775 root:root), in the module and chandra-face's checks. - Elevation re-runs on the same interpreter (sys.executable). "OpenCV is missing: run just install-face" instead of naming the distro package. Dropped a stray __pycache__. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf |
||
|
|
fa634956cc |
auth dialog: keep typed text when the polkit helper ends before asking
CI / test (push) Successful in 2m1s
If polkit-agent-helper-1 exited (or the socket service refused) before sending a PAM prompt, the dialog counted it as a wrong password, wiped the field and restarted the helper immediately, in a tight loop, so typing seemed to do nothing. Now such an early end keeps what was typed, shows why, and retries after 1s/2s/4s (then on Enter). Every helper event and route is logged as "chandra: polkit helper ..." (never the typed text). Adds an end-to-end test that types through handle_input with a real xkbcommon keymap, including Shift, across a helper that dies at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgkRPrAzXECBUGmNEE |
||
|
|
932fca627e |
Face unlock: a Howdy-style PAM module, shown in the password dialog and set up in Settings
CI / test (push) Successful in 2m6s
- face/pam_chandra_face.so (`-auth sufficient`): runs `chandra-face compare` as root with a clean
environment, forwards what it says as PAM_TEXT_INFO / PAM_ERROR_MSG, and maps its exit status
to success / auth error / unavailable, so the password always still works. Skips remote
sessions (PAM_RHOST, SSH_CONNECTION), a closed lid and users without faces; refuses a helper
that isn't root's; kills one that hangs (timeout + 6 s).
- face/chandra-face (Python + OpenCV): YuNet finds the face, SFace embeds it, cosine similarity
against the enrolled embeddings (threshold 0.42, two matching frames, dark IR warm-up frames
skipped, optional require_ir). enroll / list / remove / clear / test / status / pam
enable|disable / fetch-models (sha256-pinned opencv_zoo models). Embeddings only, in
/var/lib/chandra-face/USER/faces.json (root, 0600); labels in faces.list (0644). Store, config
and models must be root's and not writable by others. Root commands re-run through run0 (or
pkexec), so polkit asks first. Settings in /etc/chandra/face.conf.
- `just install-face [--pam]`, `just uninstall-face [--purge]` (face/install.py; uninstall takes
the module out of every PAM service first). `pam enable` inserts before the first auth or
@include line (Debian's sudo has only @include common-auth), keeping a .bak.
- Password dialog: a face row ("Looking for your face…" with a sweeping ring, "Face
recognized", or why not, "Type your password instead"); typing and Enter during the scan go in
when PAM asks for the password. Howdy's pam_howdy.so messages are understood too.
- Settings > Session > Face unlock: "Use my face for passwords" (polkit-1 + sudo), the enrolled
faces (Remove takes a second click), "Add a face…", and the tool's progress. New `face-unlock`
capability: tables 24 (status) and 25 (faces), request 44, in the wasmer/wasmtime stub, the Rust
host, the MoonBit wasmhost and chandra:host/plasmoids. compositor/shell/face.mbt runs the tool
on a socket so the compositor never waits.
- Tests: face/test_face.py (fake camera of PGM frames + fake recognizer; --pam builds the module
and runs it through pamtester), dialog states and message parsing (polkit_test), the dialog via
a mock helper (auth_test, shots 14/15), Settings against a fake chandra-face (face_test).
scripts/test.sh runs them (compositor/polkit was missing from its native list), CI installs
libpam0g-dev + pamtester. Also regenerated two stale desktop-module bindings (doc comments).
- docs/face-unlock.md, including the limits of 2D face recognition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
|
||
|
|
0f71779819 |
Desktop modules: a wasm module can fill the desktop, with Icon Desktop and Live Starfield
CI / test (push) Failing after 30s
A module that exports chandra:desktop/desktop-module (wit/desktop.wit) owns the desktop behind the windows instead of a box in the panel: same sandbox, draw ops and capabilities, drawn at the output's full size and re-rendered on resize. It gets pointer and scroll events only on the empty desktop (windows, panel, popups and menus always win; a drag stays with the module until release), keys only while the desktop has focus, and can draw over the wallpaper or replace it. Its tick() asks for animation frames only while something moves; the main loop sleeps until the next one (wake_timeout), and frames pause while a window covers the desktop, so an idle desktop module costs nothing. Settings > Desktop gets "On the desktop": Wallpaper only, Clock card (default) or any installed desktop module, saved in state.edn as :desktop, loaded at login and reloaded by chandra-ctl reload. Right-click the empty desktop for Module settings and System settings. Hidden settings (empty label) are persisted by the shell, which is how Icon Desktop keeps icon positions. Samples: Icon Desktop (click to launch, drag to arrange, keyboard navigation, count and size settings) and Live Starfield (pointer steers, click or Space warps, wheel sets speed). Served by all hosts: compositor/wasm (native + MoonBit wasmhost) and Rust host-wasm. Docs in docs/desktop-modules.md; tests in compositor/host/desktop_test.mbt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgf1SwPMHVfLUbJKsB |
||
|
|
30f5e88639 |
Overview (Exposé): every window side by side when the launcher opens, or alone on Super+W
CI / test (push) Successful in 1m35s
Opening the launcher (Super tap or its panel button) now also shows every window of the workspace scaled down beside it, over the dimmed wallpaper, like GNOME's Activities overview: a natural layout (rows, one scale, aspect ratios kept, never enlarged), minimized windows dimmed, windows gliding in and out over 220 ms. Hover lights a window and shows a close button; click brings it forward and closes the overview and launcher; middle-click closes the window; Escape or a click on empty space closes it. Typing in the launcher's search fades the windows whose title and app id don't match. - compositor/host/overview.mbt: layout, area beside the launcher, hit testing, easing, input and draw ops; previews reuse the Alt+Tab thumbnails (10 fps refresh, nothing redrawn once settled). - New shortcut "overview" (Super+W) in the shortcut table, rebindable in Settings > Shortcuts. - chandra-ctl / control socket: "shortcut ID" runs any shortcut by id. - Both renderers keep only one large scaled copy per image (a gliding preview is drawn at a new size every frame) and draw images up to 4096 px. - Tests: layout packing and aspect ratio, balance, hit testing, animation, Super tap + click, Super+W + Escape/empty click, search filter, middle click, inspector, control command; screenshots of 1/4/9 windows in dark and light. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgo3PfGPY8wwv21ZZS |
||
|
|
acf2daa399 |
CI: green again (moon update, wasmer + native deps, stale tests)
CI / test (push) Successful in 1m34s
CI has failed on every push since Nov 25. In order:
- `moon check` died resolving jqlssg/moonedn: the workflow never ran
`moon update`, so the registry index was missing.
- The wasm-target `moon test` tried to instantiate compositor/{host,network,
portal}, which import chandra:host/* on wasm and only run under the native
host. scripts/test.sh now runs the wasm tests for everything outside
compositor/, and compositor/network + compositor/portal join the native run.
- The JS (jco) host didn't know the launcher's new `session` and `power`
imports; it now has in-memory versions and the configs grant them. Its tests
expect the Digital Clock's 12-hour default ("2:07 PM").
- The native compositor links -lwasmer and kms needs libseat etc.:
setup-toolchain.sh fetches the wasmer C API (WASMER_VERSION=6.1.0) into
.tools/wasmer, test.sh puts it on the C paths, and the workflow apt-installs
libseat/libdrm/libinput/libudev/libxkbcommon dev packages.
- Stale compositor tests: moon-disc has no source in the tree, so tests use
network / clock-binary instead (the wasm test skips moon-disc with a notice
when it isn't built); the in-tree layout module is a Tile | Float toggle, not
a popup; the clock lists the calendar's two settings; the settings popup is
390 wide, so the Panel-tab buttons moved right.
Locally scripts/test.sh passes end to end: 59 wasm, 15 host, 144 native tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiRjHvKRKCJHaGFekY
|
||
|
|
0feea23a06 |
Password dialog: Chandra is its own polkit agent, drawn in the shell layer
CI / test (push) Failing after 18s
run0, pkexec and other polkit prompts used whatever third-party agent was
installed: a plain toolkit window saying "start transient unit
'run-p15802-i1990.service'". The compositor now registers as the session's
polkit authentication agent and asks in its own dialog:
- a centered card over a dimmed screen, above all windows and client menus,
themed (dark/light follow the Dark mode switch), keyboard-first: Enter,
Esc, Tab order, Alt+R show/hide, Alt+D details, Ctrl+U clear
- for run0 it shows the command it will run ("gparted /dev/sda", as root)
from run0's command line (pid from polkit's details or the unit name),
pkexec's command from its details, polkit's message otherwise; Details
lists the requester, target user, unit and action id
- account picker when several admins can answer (group members expanded)
- the PAM conversation through polkit-agent-helper-1: polkit 126's socket
first, else the setuid helper on a socket pair (new sys spawn-socket on the
native, Rust and MoonBit hosts); password, echo-on prompts, info (fingerprint)
and errors (faillock) shown as they come; wrong password shakes and retries;
spinner while PAM checks; Caps Lock warning
- typing through the clients' xkb keymap (groups, Shift, AltGr, Caps Lock),
US layout when there is none
- no client has keyboard focus or input while it is up; the password is
wiped after sending and never logged
Settings > Session > "Chandra password dialog" (state.edn :auth-agent
:system when off) switches back to the third-party agent, which
chandra-session now finds and the compositor starts (also when polkit
refuses our agent). Tests: polkit_test (keymaps, helper protocol, run0
parsing, dialog states, the socket-pair route) and auth_test (mock polkit
Authority on a private dbus-daemon, mock helper; CHANDRA_AUTH_SHOTS writes
a PNG per state). Docs: docs/auth-dialog.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgkRPrAzXECBUGmNEE
|
||
|
|
6253371cb3 |
Dock and task manager are one module: titled window pills, pins, Super+1..9
CI / test (push) Failing after 30s
The panel had a task list and, beside it, a dock showing the same running
apps again. They are now one module, the dock, in the task list's place:
- Pinned apps, then running ones; an app with windows is a pill with its
window's title (or name and window count) while there is room, an icon
when the panel is crowded ("Show window titles" in Dock settings).
- Its right-click menu has the task list's window commands (Minimize /
Restore, Maximize) for a single window, or the app's windows by title.
- It stretches like the task list did; new panels get it instead of
tasks. A saved panel's "tasks" becomes the dock (one dock, where the
task list was); pins are the dock's own setting, so they carry over.
- An empty dock shows a "+ Add apps" tile that opens the Applications
menu, where right-clicking an app offers Open and Pin to dock (adding a
dock to the panel if there is none).
- Super+1 .. Super+9 open the dock's first nine apps like a click
(shortcut "dock-apps", rebindable in Settings > Shortcuts).
- "New window" / "Open" only for apps the catalog can start.
The tasks component, lib/panel's pill geometry and the taskbar-widget
world are gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiPCFHRxaJQvwex6ry
|
||
|
|
42aa770452 |
Dark mode for KDE/Qt apps: write kdeglobals colors and set QT_QPA_PLATFORMTHEME
CI / test (push) Failing after 17s
KWrite stayed light with the Dark mode switch on. KDE apps read their colors from the [Colors:*] groups of kdeglobals, not from the scheme's name, and the switch only set [General] ColorScheme with kwriteconfig. Qt 6 apps also had no platform theme under XDG_CURRENT_DESKTOP=chandra, so Qt reported an unknown (light) color scheme whatever the portal said, and KDE Frameworks 6 apps picked Breeze Light. - session/chandra-kde-colors dark|light copies the scheme's color groups into kdeglobals (counterpart of the current scheme, else Breeze, else Chandra's own ChandraDark/ChandraLight) and emits KGlobalSettings.notifyChange so running apps repaint. The compositor calls it from the switch. - chandra-session sets QT_QPA_PLATFORMTHEME to kde (plasma-integration) or xdgdesktopportal when unset, and passes it to the activation environment. - install.py installs the script and the two color schemes. - scripts/test-kde-colors.sh tests the rewriting, and that a running KWrite turns dark live; docs/dark-mode.md explains it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hjmk6mgq6Gg5vgKfMp |
||
|
|
4437a3a576 |
Rename just install-session to just install
CI / test (push) Failing after 16s
install-session(-dev/-rust/-native) become install(-dev/-rust/-native) and uninstall-session becomes uninstall, so installing is just `just install`. The old names stay as hidden recipes that print a one-line note and run the new one. Docs, scripts and comments now point at the new names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hj5zRiffcgWaggHdjv |
||
|
|
c45e0ef431 |
Dock: pinned and running apps with real icons, window dots, hover names and a per-app menu
CI / test (push) Failing after 17s
The dock showed the first eight catalog apps as letter tiles, and that list reshuffled after every launch (the catalog puts recent apps first). Now: - Pinned apps first, in the order you set, then the other running apps after a thin divider (like macOS). Windows find their app by desktop id, case, the last dotted part, or the app's name (xterm -> debian-xterm.desktop "XTerm"); windows without an app id stay out. - Real icons from the icon theme (the `icons` capability, as in the task manager), with the letter tile as fallback. The shell publishes icons for pinned apps that aren't running too. - A dot under an icon per open window (up to three), a longer accent bar when the app has focus. - Click: start the app if it isn't running, otherwise bring its newest window forward (restoring it if minimized); click a focused app again to step through its windows. - Hover: the icon grows (neighbours a little) on a light highlight, and the shell draws the app's name in a label above it. - Right-click an icon (drawn by the shell, like the task manager's window menu): Open / New window, Pin to dock / Unpin from dock, Move left / Move right, Quit or Close N windows, and Dock settings. - Dock settings (module-config): Icon size (Small/Medium/Large), Magnify icons under the pointer, Show running apps that aren't pinned. The pinned list is a hidden setting (empty label: the shell's settings menu skips it), saved in state.edn's :module-config. Until it is set the dock pins the catalog's first five, and the shell saves that once so launches don't move them. - The panel sizes the dock from its current items (a module's preferred width is read once). Plumbing: new WIT world dock-widget (app-catalog, app-launch, windows, icons, exports module-config); no new interfaces, so both hosts load it as is. lib/dock holds the items, layout, hit-testing, drawing and pin edits, shared by the module and compositor/shell/dock.mbt. The shell's Launch handling moved into launch_catalog_app so the menu can use it. Also: DesktopShell::pointer_move delivered every hover move twice (a duplicated block). Tests: lib/dock (settings round trip, app matching, item order, hit-testing with the divider, clicks and window cycling, drawing, pin edits), compositor/host input_test (the dock in a real compositor: saved default pins, growing for running apps, hover label, the menu's rows and actions, settings menu without the pinned row, focusing by click), dock_test (screenshots in _build/dock_hover.png and dock_menu.png). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hkmB8pJF5ckPeecFxL |
||
|
|
bb7c9b947f |
Settings > Apps: choose the default browser, email, files, terminal, editor, viewers and players
CI / test (push) Failing after 45s
- A sixth Settings tab, Apps (key 6, SettingsTab::Apps; the popup is 390 px wide for it): Web
browser, Email, File manager, Terminal, Text editor, Image viewer, Video player, Music player,
PDF and documents, Archive manager. Each row shows the current default with its real icon (the
icon-theme lookup the task manager uses; a letter tile when there is none). Click a row to list
the installed apps that can take it, click one to make it the default. A chosen app that has
been uninstalled since is named in red under its row ("gthumb is not installed any more").
- Installed apps come from the .desktop files in the XDG data dirs (and flatpak's exports), with
MimeType= and Categories= (desktop_entry_keys, now shared with the launcher's parse_desktop).
A kind lists the shown apps that handle one of its MIME types; the terminal lists
TerminalEmulator apps; browsers are only offered as browsers.
- Reading follows the mimeapps.list spec: $XDG_CONFIG_HOME/[chandra-]mimeapps.list, then
$XDG_CONFIG_DIRS (/etc/xdg), then $XDG_DATA_HOME and $XDG_DATA_DIRS applications/; the first
installed [Default Applications] entry wins, else [Added Associations], else mimeinfo.cache
(minus [Removed Associations]), else the first installed app that handles the type. A hidden
(NoDisplay) default still counts and its name is shown.
- Setting writes [Default Applications] in ~/.config/mimeapps.list for each of the kind's MIME
types the app handles (always the main one: http/https/text/html for browsers, mailto,
inode/directory, text/plain, image/png..., video/mp4..., audio/mpeg..., application/pdf...,
application/zip...), as xdg-mime default / xdg-settings do, without running them. Every other
section, entry, comment and blank line is kept; the app leaves those types' [Removed
Associations]; a chandra-mimeapps.list that already names one of those types is updated too.
- The terminal has no MIME type: state.edn :terminal "kitty" (desktop id), also written first in
~/.config/xdg-terminals.list (xdg-terminal-exec). Terminal=true apps from the launcher (and
session restore) now start in it (foot -e, kgx/gnome-terminal/ptyxis --, kitty <cmd>, wezterm
start --) instead of always foot; with no choice: xdg-terminals.list, then foot, then any
installed terminal. Terminal apps are listed when any terminal emulator is installed, not only
foot.
- New `default-apps` capability (categories, apps, set-default, refresh): host tables 11 (sss:
name current missing) and 12 (issii: category id name icon current), request 19 (category *
1000 + app, -1 rescans) in the wasmer/wasmtime stub, host-wasm and the MoonBit wasmhost
(chandra:host/plasmoids default-app(s32)). Nothing is scanned until the tab opens (refresh).
- Tests with a temporary XDG tree: categories and current defaults (user file, system file,
Added Associations, mimeinfo.cache, missing apps, hidden defaults), writing that keeps other
entries, desktop-specific files, the terminal list and commands, the Apps tab end to end, and
the :terminal round trip through state.edn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgywj7RPmFdFhpzGZj
|
||
|
|
442f9477b4 |
CPU, round two: cheaper client captures, content-only redraws, damage-limited KMS and nested output
CI / test (push) Failing after 19s
Measured on the MoonBit host, 1080p, cloud container (two runs each, before -> after): - full-screen (tiled) client redrawing at 60 fps: 43/39% -> 31/35% - 800x600 floating client at 60 fps: 15.5/13.2% -> 10.4/11.9% - client inside the nested window: nested 18% -> 12%, outer 17% -> 11.6% - Alt+Tab open over two animating clients: 36.6% -> 25.4% - idle (headless / nested): 0.2-0.6% -> 0.1-0.3% wasmhost raster: - capture keeps client pools mapped (keyed by dev/inode/size, dropped after 1 s unused) and reuses released surface buffers, swizzling a word at a time: 3.2 -> 2.1 ms per 1080p commit. - a window whose only change is a new buffer damages just its client area, and the topmost opaque buffer that covers the damage is drawn first (no backdrop copy, desktop card, lower windows or its own decoration under it): submit 3.2 -> 0.8 ms per full-screen frame. - the framebuffer tracks what changed since each output took it. The nested window's frames are a ring of three mapped memfds, each updated only where the screen changed, instead of a new memfd with a full 8 MB conversion and write every frame. - KMS: present copies only the rows the back buffer is missing (this frame's change and the last one's), and kms_stub.c is compiled with -O2 (its stub-cc-flags dropped moon's default, so the per-frame copy ran unoptimised). - images re-filled under the same handle (Alt+Tab previews) damage where the panel draws them: before, a live preview only repainted where it overlapped the window that redrew. compositor: - Alt+Tab previews of a window that keeps redrawing are remade at most every 100 ms (scaling a 1080p buffer takes ~2 ms); the loop keeps its pace while one is pending. - set-tokens is sent to the host only when the theme changes (it was 9 calls a frame). - /proc is sampled only when a module imports `system`; a machine without a battery looks for one every 30 s instead of probing eight sysfs paths every second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hkh3qygSXtftCTVhSZ |
||
|
|
99c6c66726 |
Launcher: Reload session, and Log out moves in from its own module
CI / test (push) Failing after 17s
The Application Launcher's menu now ends in a session row: Reload, Log out, Suspend, Restart,
Power off. Log out, Restart and Power off take a second click on the same button (a status line
says "Click Log out again to confirm"); Reload and Suspend act at once.
- Reload calls the new session.reload, which reaches the shell as the ReloadSession request
(native stub: request 8 with n 1; host plasmoids.wit: reload-session; host-wasm: Req::ReloadSession)
and runs DesktopShell::reload_modules(""): every panel module again from disk, in place, with
its settings. Windows and apps keep running. The compositor redraws the whole frame after it.
- Suspend / Restart / Power off use the power capability, the same calls as Settings > Power.
- The standalone logout module is gone (component, world, components.txt). Saved panels drop
"logout", or get the launcher in its place when they had none; panel.edn is rewritten without
it. A stale logout.wasm is hidden from Settings > Panel (retired_modules).
- Tests: lib/launcher session row, shell migrate_panel, host input tests for Log out and Reload,
host-wasm launcher session row; control_test uses inspector.wasm instead of logout.wasm.
- README and docs/reloading.md describe the session row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjKUnSS3D92ThigvJf
|
||
|
|
68164ff75e |
Reload panel modules from outside the session: control socket, chandra-ctl, SIGUSR1
CI / test (push) Failing after 16s
Until now a module reload was only reachable by clicking Settings > Panel inside the session. Now: - The compositor listens on $XDG_RUNTIME_DIR/chandra/<wayland socket name>.sock (the login session's is wayland-moon-0.sock) with a line protocol: ping, list, reload [NAME], help. Replies end with an "ok ..." or "error ..." line. It lives in compositor/host/control.mbt, runs from ChandraCompositor::step, and its fds join the idle loop's wait set, so an idle desktop still sleeps (measured ~0.4% CPU on wasmhost, ~0.1% on host-wasm) and wakes for a command. A path another live compositor answers on is left alone. - DesktopShell::reload_modules(name) reloads every loaded module (or those whose module id, stem, slot or path is NAME) in place via replace_slot: same panel position, saved :module-config applied, a module that fails to load stays as it was and the error is reported to the caller and shown as a notice. The catalog is rescanned. - SIGUSR1 to the host reloads every module (result in the log and the notice): new WIT function sys.take-sigusr1, implemented in compositor/sys (native build and wasmhost) and host-wasm; the handler has no SA_RESTART so it interrupts the idle poll. - session/chandra-ctl (installed to /usr/local/bin), `just reload [NAME]`, docs/reloading.md, README. - Tests: compositor/host/control_test.mbt (protocol, reload all / by name / by slot, order and settings kept, failing module kept, busy socket). Checked headless on both hosts with chandra-ctl and kill -USR1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hjLJtvYcgW48okL6qQ |
||
|
|
0fc2598d27 |
Delta drew in a 640x480 corner of a full-size window: ask again when a client keeps another size
CI / test (push) Failing after 17s
GPUI apps (Delta, Zed) answer a configure that takes the maximized state away by going back to their old floating size, whatever size it asks for. Unmaximized into a tiled slot (or a layout change while maximized), Delta kept drawing 640x480 and Chandra padded it out with the bottom right colour to the whole frame, so only the sidebar and toolbar showed. The server now tracks each toplevel's last configure and the serial the client acked. When a client commits a buffer of another size after acking the latest configure, the same configure is sent once more (GPUI, no longer maximized then, takes it). A client that still keeps its own size gets a ToplevelSizeChosen: a floating window's frame follows it, a tiled, maximized or fullscreen window keeps the compositor's size. Sizes take set_window_geometry and set_buffer_scale into account. CHANDRA_DEBUG_CONFIGURE=1 logs configures, acks and committed buffer sizes to stderr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiKUmCPZNFNiGwd8EW |
||
|
|
a215dd6bf7 |
Clock calendar: left click slides out a month calendar
CI / test (push) Failing after 17s
Left-clicking the Digital Clock (or the Binary Clock) opens a calendar flyout that slides up out of the panel; Escape, a click elsewhere or another click on the clock slides it back in. - lib/clock/calendar.mbt: month maths (leap years, weekday, ISO week numbers), a six-week grid, the flyout's state, drawing and hit testing. Header with the time (in the clock's own 12/24-hour format) and the long date; month and year with previous / Today / next buttons; weekday names; today circled in the accent colour, other months' days muted. Keys: Escape closes, t today, p/n previous/next month. - Module settings (right click): "Week starts on" Sunday/Monday and "Show week numbers", for both clocks (saved per module like the other settings). - compositor/shell/slide.mbt: popups of the clock modules slide (200 ms, ease-out in, ease-in out), clipped to their final place so they come out of the panel edge; the popup takes input at its final place at once. A popup below the panel would slide the other way. Theme comes from the module's tokens, so dark/light follow. - CPU: has_timed_work() is true only while a slide runs, so the main loop only keeps the frame pace for those 200 ms; an open calendar redraws only when its minute or month changes. - Tests: lib/clock calendar tests (wasm), compositor/host/calendar_test.mbt (open, slide finishes, month buttons, Escape / click outside / toggle, settings, binary clock). Host failures are the 5 known input_test ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hjahaLE5XqnCWoEwKv |
||
|
|
34885bfdda |
Settings > Shortcuts: rebind the compositor's keyboard shortcuts
CI / test (push) Failing after 18s
- One shortcut table (compositor/shell/shortcuts.mbt): named actions with their default combos,
the same as before: Super tap launcher, Super+D, Alt+Tab, Super+Shift+S, Super+Shift+Print,
Print, Super+Print, Super+Ctrl+Print, Super+Shift+R, Super+Alt+R, Super+Ctrl+R. Combos are
"Super+Ctrl+Alt+Shift+Key" text (parse/print, aliases like Meta, PrtSc, Return); "Super" alone
is a Super tap. Two shortcuts on one combo conflict and the one listed first wins.
- The compositor looks every non-modifier key press up in the table (compositor/host/
shortcuts.mbt) instead of the hardcoded checks in showdesktop/screenshot/recorder; the switcher
reads its combo from it (hold the combo's modifiers, its key steps, Shift reverses, releasing a
held modifier switches). Matching is now exact on Super/Ctrl/Alt/Shift (caps/num lock ignored),
so e.g. Super+Shift+D or Ctrl+Print no longer fire Super+D / Print.
- Settings gets a fifth tab, Shortcuts (key 5, SettingsTab::Shortcuts): every shortcut and its
combo. Click a row (or Enter) and press the new keys: the compositor captures the combo before
anything else sees it (Escape cancels, Backspace unbinds, a Super tap binds "Super"; window
switching keeps waiting until the combo has a modifier). Changed rows get a Reset button
(Backspace/Delete on the highlighted row too), plus "Reset all to defaults"; conflicting combos
show in red with a line saying which shortcut wins. The popup is 360 px wide for the fifth tab.
- New `shortcuts` capability (shortcuts, capture, cancel-capture, reset, reset-all), served from
host table 10 and request 18 by the wasmer/wasmtime stub, host-wasm and the MoonBit wasmhost
(chandra:host/plasmoids `shortcut(s32)`).
- Changes are kept in state.edn as :shortcuts {:show-desktop "Super+Ctrl+D" ...} (only the ones
that differ; "" unbinds), applied at startup and live.
- There were no window-management or tiling key shortcuts to move into the table.
- Tests: combo parsing/printing, defaults, conflicts, switcher constraint, save/restore pairs,
rebinding through the compositor, capture (Escape/Backspace/Super tap), the Shortcuts tab
(capture, conflict line, Reset, Reset all) and the state.edn round trip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjypNwGHE9WeFvnWLA
|
||
|
|
8ecdef17d4 |
Settings > Panel: a cleaner module selector with reordering
CI / test (push) Failing after 17s
The Panel tab was one flat list: every panel module with an "x" that removed it on any click, then every module on disk again with cryptic "x1" counts and a Browse row that looked selected. - "In the panel, left to right": the modules in panel order, each with move up / move down / remove buttons. Clicking the row itself does nothing, so a stray click no longer removes a module. Backspace/Delete removes the highlighted one, PageUp/PageDown move it. - "Add to the panel": grouped (Apps and windows, System, Clocks, Other), each with a one-line description and an Add button. A module already in the panel is left out, except clocks, which offer "Add another". With nothing left: "Everything is in the panel". - "Browse for a module file..." is a secondary outlined button. - Section headings are larger and full contrast; the popup is 320 wide and now fits a 720-high screen with the default panel. Reordering goes through a new modules.move-instance(slot, delta) capability call, plumbed through both hosts: wasmer stub request 17, host-wasm, the plasmoids host WIT (move-instance(instance-move)) and wasmhost. The shell's move_slot clamps to the ends and saves panel.edn, so the saved format is unchanged. DesktopShell::slot_popup_texts lets tests find popup rows by text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhRDWZf5WcmrNwnFe3 |
||
|
|
005e11e7bf |
Chrome follows the Dark mode switch: Chandra serves the portal's color-scheme
CI / test (push) Failing after 17s
Chrome (and Firefox, Electron, GTK 4, Qt 6) read dark/light from xdg-desktop-portal's Settings
interface. With XDG_CURRENT_DESKTOP=chandra and no chandra-portals.conf, xdg-desktop-portal found
no Settings backend (gtk/gnome are UseIn=gnome, kde is UseIn=KDE) and exported no Settings
interface at all, so the gsettings color-scheme
|
||
|
|
c7a6c8376e |
Merge the 12-hour clock into the Digital Clock
CI / test (push) Failing after 18s
clock-digital12 and clock-digital had become the same module (same lib/clock code, same right-click settings), differing only in the starting format. Keep one: the Digital Clock now starts in 12-hour mode with AM/PM, and its "Time format" setting switches to 24-hour. - components/clock-digital12 is gone (and from scripts/components.txt); lib/clock drops digital12_info/digital12_config. - The default panel loads clock-digital. - "clock-digital12" stays an alias (find_module, slot_of, saved panels) and is never listed in the module picker, even if an old .wasm is still installed. - panel.edn gets :version 2. A version-1 panel is migrated once: the old 12-hour clock becomes the Digital Clock with its settings (state.edn :module-config) moved over in 12-hour mode; a panel that had the old 24-hour Digital Clock keeps 24-hour. The file is rewritten afterwards. - Tests updated, plus a migration test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgnZsS91fwCreut8FL |
||
|
|
f844ac66ff |
Task manager: right-click a window's pill for Minimize/Restore, Maximize, Quit
CI / test (push) Failing after 16s
- Right-clicking a pill in the task manager opens that window's menu (titled with the window's title): Minimize (Restore when minimized), Maximize (Restore size when maximized) and Quit, which asks the app to close the window (xdg_toplevel close, like the title-bar close button). Empty task-bar space keeps the module's own menu (Module settings, Replace with, Remove widget). - Modules only get left clicks, so the shell draws the menu and hit-tests the pills itself: the pill geometry moved to lib/panel/tasks.mbt, shared by the tasks module and the shell. No WIT change, so every host works as before. - New menu row kind 6 and ShellAction::Window(id, WindowCommand); the compositor runs it through the same WM requests as the title-bar buttons. WinInfo carries `maximized`. - Tests: native end-to-end (menu rows, minimize/restore, maximize/restore size, Quit sends close, empty space keeps the module menu) and lib/panel pill geometry tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiX13fXK1eMboRe5oQ |
||
|
|
caa12058fd |
Screenshots, recording and --gfx-out keep the screen's pixels on the host
CI / test (push) Failing after 17s
New chandra:host/raster functions, on both hosts: write-frame-png (--gfx-out), grab-recording-frame / send-recording-frame (the recorder streams frames from the host to ffmpeg) and snapshot-frame / snapshot-png / snapshot-pixels (screenshots freeze, crop and encode the screen there; the magnifier and the notification's thumbnail read small scaled copies). The wasm compositor sets them up through frame_recorder and frame_shots; the native compositor keeps its pixel path. Moving whole frames as list<u8> is cheap for the Rust host but costs about 0.4 s a 720p frame through the wasmtime C API. A full-screen screenshot now takes 45 ms on the MoonBit host (was 472) and 8 ms on the Rust host (was 112); recording runs at 30 fps on both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiNfjrw2edja7LiRLB |
||
|
|
1f4b686087 |
Network module: Wi-Fi and wired status, connect to Wi-Fi networks, Wi-Fi and airplane switches
CI / test (push) Failing after 18s
- New `network` panel module (in the default panel, before the battery and the clock): signal bars and the
Wi-Fi network's name, a plug when wired, crossed-out bars offline or in airplane mode. Its
popup shows the status and the last action's outcome ("Couldn't connect to X: wrong
password?"), switches for Wi-Fi and airplane mode, and the networks in range (strongest
access point per name, the one in use first). Click a saved or open network to connect, a new
secured one to type its password in a field under it (Enter or Connect), the one in use to
disconnect, or "Forget" on a saved one. Opening the popup asks for a scan.
- compositor/network: NetworkManager over D-Bus through a small D-Bus client of our own
(wire format, EXTERNAL auth, async calls) on the existing @sys socket calls, so neither host
needed new imports. One ObjectManager.GetManagedObjects + GetAll every 2 s; GetSettings once
per saved connection; RequestScan, Device.Disconnect, WirelessEnabled / WwanEnabled,
ActivateConnection (saved), AddAndActivateConnection (new: open, WPA/WPA2 PSK, WPA3 SAE) and
Settings.Connection.Delete. Without NetworkManager it falls back to read-only status from
/proc/net/dev, /proc/net/wireless and /sys/class/net (no network names there), and looks for
NetworkManager again every 30 s.
- New `network` capability (wit/capabilities.wit): status, wifi-networks, scan, connect,
disconnect, forget, set-wifi-enabled, set-airplane-mode. Served from host tables 8/9 and a
`network(network-request)` request by the wasmer/wasmtime stub (compositor/wasm), host-wasm
and the MoonBit wasmhost. The stub's build_list learned bool fields; request strings are
wiped after use (Wi-Fi passwords).
- Running out of module instances now says "too many modules loaded".
- Deferred: VPN, hotspot, hidden networks, WEP and 802.1X (enterprise) networks, IP settings,
mobile broadband beyond the airplane switch, D-Bus signals (state is polled).
- Tests: D-Bus wire format (incl. the well-known Hello bytes), NetworkManager objects -> status
and list, security settings, /proc parsing; the module through the shell against a fake
backend (list, connect/forget/disconnect, password entry, switches, read-only); a host-wasm
test; and scripts/test-network-dbus.sh, which runs the backend against python-dbusmock's
NetworkManager on a private bus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hizqNXcNDuef3gxa7D
|
||
|
|
88915842c2 |
Battery panel module: charge, charging state, time left, low-battery warning
CI / test (push) Failing after 18s
- New `battery` panel module (components/battery, logic in lib/battery): a battery icon filled to
the charge with the percentage and time remaining ("73% 2:05"; time to full while charging).
The fill turns green when charging or full, amber at 20 % and below, and at 10 % the whole
button turns red and a "Battery low" popup opens by itself, once per discharge spell. A click
opens the details (charge, state, time left in words). Without a battery it shows a plug.
- Right-click "Module settings": Show percentage, Show time remaining, and Without a battery
(Show a plug / Show nothing). Saved per module in state.edn like the clocks' settings.
- New `battery` capability (wit/capabilities.wit: read -> status {percent, charge-state,
secs-left}). Served by the wasmer stub (host ints 7-9), host-wasm and wasmhost (publish-battery).
- Host side (compositor/shell/battery.mbt): reads /sys/class/power_supply, every battery
together (energy_* / power_now, or charge_* / current_now; capacity when that is all there
is; device-scope batteries like mice are skipped). The `system` snapshot the Power tab uses
now reads the battery through the same code. Time left follows a running average of the
rate, starting over when the state changes.
- A fresh panel gets the battery module before the clock only on a machine with a battery.
- wasm_stub: MAX_INST 512 -> 2048. The host test binary creates ~70 compositors without
unloading their modules; at 512 the last tests' panels came up half empty.
- Tests: sysfs reading against a fake power supply (energy and charge units, two packs,
charging, full, capacity only, no battery), the running average, the module in the panel
(text, settings, click, the critical warning, the plug), the rendering logic, and a
host-wasm test of the module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hky51dmaUqiYW746Gz
|
||
|
|
2636373a4f |
Power settings: screen off and suspend when idle, battery, suspend / restart / power off
CI / test (push) Failing after 18s
- Settings gets a Power tab (fourth; key 4 or SettingsTab::Power): the battery when there is
one (the system capability), "Turn screen off after" (Never, 1 min ... 1 hour; default 10 min)
and "Suspend after" (Never, 5 min ... 2 hours; default never), a click stepping through the
choices, and Suspend / Restart / Power off now. Restart and Power off need a second click.
- New `power` capability (screen-off-minutes, suspend-minutes and setters, suspend, power-off,
reboot), served by the wasmer stub (host ints 5/6, requests 13-15) and host-wasm
(publish-power, set-screen-off / set-suspend-after / power-action).
- The timeouts are kept in state.edn as :power {:screen-off N :suspend N} when not the defaults.
- Login session only (compositor/host/power.mbt): input restarts the idle time; power_tick,
run every pass of the main loop (an idle loop still wakes about once a second), turns the
screen off through DPMS and back on at the next input, and suspends once per idle spell.
Monotonic time stops in suspend, so a resumed machine waits for input and a new idle spell.
Suspend, restart and power off run `systemctl <verb> || loginctl <verb>` (logind, so its
inhibitors and polkit rules apply); a nested window only shows a notice.
- Display: chandra:host/display set-power and Kms::set_power; the shared C shim sets the
connector's legacy DPMS property, shows no frames while off (frame_ready false, so the idle
loop still sleeps), redoes the modeset when turned on, and keeps the screen off across a VT
switch.
- components/screenshot bindings regenerated (they were stale: the module didn't build).
- Tests: idle timer sequence, the Power tab driving the shell (timeouts, two-click power off),
the state.edn round trip, a host-wasm test of the tab, and logind commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3
|
||
|
|
ba82d3c59b |
Idle desktop sleeps instead of redrawing; only changed parts of the screen are redrawn
CI / test (push) Failing after 15s
Measured headless and nested at 1080p (host-wasm), against main: - Idle: ~9.4% CPU per compositor -> ~0.35%. Idle frames cost ~1.3 ms, and the loop woke 60-125 times a second to find nothing had changed. - One 800x600 floating client animating at 60 fps: 33% -> 16% CPU; raster per frame ~4.5 ms -> ~0.9 ms. A full-screen tiled client: 65% -> 54% (its cost is now mostly copying the 8 MB buffer out of the client's shared memory). Changes: - shell: the wallpaper and desktop card ops (~1900, the moon disc is drawn per pixel) are kept and reused until what they are drawn from changes (size, theme, wallpaper, card position, date, hour:minute). This was ~75% of an idle frame. - FrameSig compares the background by identity first instead of op by op. - Host tables (windows, layouts, ...) are only sent to the host when their bytes change. - Main loop: a pass with no input, no changed frame and nothing waiting to be shown blocks in the new sys.wait-readable on the Wayland socket and clients (plus the nested host connection; the login session's seat, DRM and libinput fds are added by the host) until just before the wall clock's next second, then polls every 5 ms until it turns, so clocks still tick on time. Recording, pending screenshots and toasts keep the frame pace (ChandraCompositor::has_timed_work). - Host raster: works out what changed from the last frame. When only windows changed (a client drew, a window moved, focus moved) it redraws just their footprint (decoration and shadow included, old and new place), copying back only that part of the cached backdrop; anything else still redraws everything. A test checks the partial redraw is pixel-identical to a full one for a client redraw, a move and a focus change with stacking swapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hku78wdzXtY9QsR9NW |
||
|
|
51b914f6cf |
Alt+Tab switcher: show a preview of each window
CI / test (push) Failing after 19s
The switcher is now a grid of cards: a scaled-down picture of each window's last frame over its app icon and title, the selected card lit. Cards wrap into rows and shrink to fit small screens. - Previews keep the buffer's aspect ratio and are never enlarged. - Minimized windows show the last frame they drew, dimmed, marked "minimized". A window with no buffer yet shows its app icon (or its initial) on a plain tile. - Cheap: nothing is scaled while the switcher is closed. A preview is made when the switcher opens and again only when that window commits a new buffer (or its shown size changes), into the same image handle; handles of closed windows are reused. The native scaler samples at most 3x3 points per preview pixel, so big windows cost about the same as small. - Both hosts: native scales the wl_shm snapshot in the software renderer (renderer.shm_thumbnail + set_image); the wasm compositor asks the host with the new chandra:host/raster thumbnail(surface, w, h, reuse), which scales the captured surface natively, so no pixels cross the boundary. - Frames the screenshot overlay held back mark previews stale too. Tests: switcher_test (preview pixels, aspect, no-buffer, stale and remade into the same handle, minimized), renderer shm_thumbnail/set_image, host-wasm thumbnail scaling and handle reuse. Pre-existing failures on main are unchanged (6 panel-module host tests, the screenshot panel module test, host-wasm translucent_surfaces_blend). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hjDvAsSQUdTTUGA3n5 |
||
|
|
8f88d93d9f |
Apps drawing with Vulkan on wl_shm (Delta, Zed) show every frame
CI / test (push) Failing after 16s
Delta is a GPUI app: it draws with Vulkan, and without linux-dmabuf Mesa's WSI presents through wl_shm, making one wl_shm_pool per swapchain image. libwayland flushes those create_pool requests with all their fds in one sendmsg (vkcube on lavapipe sends 4), but both hosts kept only the first SCM_RIGHTS fd and closed the rest. Every pool but the first had no memory, so only one swapchain image ever reached the screen: stale, frozen or flickering windows. - recvmsg keeps every fd (up to 32), in order: natively through recvmsg_fds, and in the wasm host through a new chandra:host/sys take-fd import. - A commit consumes the attached buffer. A bare commit (GPUI commits after ack_configure) used to re-show and re-release the old buffer, which the client may already be drawing its next frame into. - ARGB8888 client buffers are blended as premultiplied alpha, as wl_shm defines, in both rasterisers (translucent edges were darkened). - wl_seat.name and wl_output.scale/done are only sent to clients that bound version 2 or later (vkcube binds v1 and aborted on them). Regression test: a client flushes three pools with their fds in one message, then commits a bare frame; it fails on the old code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hm8wb1UKxQxf8o6gpz |
||
|
|
85f6ff42f4 |
Screenshot module after Spectacle (Super+Shift+S), with a screen recorder
CI / test (push) Failing after 16s
- Super+Shift+S (or Super+Shift+Print) freezes the screen under a selection overlay, like Spectacle's Rectangular Region: drag a rectangle (size readout under it, magnifier while drawing), drag inside to move it, drag its handles to resize, or click a window to select it. Enter or a double-click takes it, Escape or right-click cancels; F full screen, W active window, arrows nudge (Shift+arrows resize). Print takes the full screen, Super+Print the active window, Super+Ctrl+Print the window under the pointer. - Saved as ~/Pictures/Screenshots/Screenshot_YYYYMMDD_HHMMSS.png (XDG_PICTURES_DIR honoured), put on the clipboard as image/png (compositor-owned wl_data selection, written to the paste pipe without blocking), and confirmed by a notification with a thumbnail. - Screen recording: Super+Shift+R picks a region on the same overlay, Super+Alt+R the screen, Super+Ctrl+R a window; the same shortcut or the REC pill (top centre) stops. Raw frames (<= 30 fps, wall-clock stamped) stream into ffmpeg over a unix socket; it writes H.264 MP4 to ~/Videos/Screencasts/Screencast_*.mp4. The pointer is drawn in unless switched off. - renderer: encode_png_compressed (per-row filters + LZ77/fixed-Huffman deflate): a 1280x720 desktop is ~90 KB instead of 3.7 MB. - New 'screenshot' capability and 'screenshot' panel module (in the default panel): Spectacle's modes and the recording modes with their shortcuts, and a pointer switch; the button becomes Stop while recording. Served by both hosts (wasmer stub request 12 / host int 4; host-wasm publish-screenshot and a screenshot request). Panel requests wait for a frame without the module's popup. - sys: pwrite with a negative offset is a non-blocking write (pipes, sockets), SIGPIPE ignored. - Tests: native overlay, shortcuts, window pick, module, recording (with ffmpeg); host-wasm module test; renderer compression test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hjMGSLc5tHuzjsxGVa |
||
|
|
b33373d801 |
Right-click menus inside apps: keep them open and on screen
CI / test (push) Failing after 15s
Chrome's context menu opened and closed at once: when a client created an xdg_popup the compositor moved keyboard focus to it straight away, and the wl_keyboard.leave on the window made Chrome dismiss the menu. Popups now only take the keyboard when they ask for a grab (xdg_popup.grab, as Qt menus do) and once they have a buffer; Chrome's grab-less menus leave focus on the window. Also: - honour xdg_positioner constraint adjustment (flip, slide, resize) so the configure tells the client where its menu really is, instead of the host silently nudging it on screen (Chrome then took the button release as a click on a menu item); - answer xdg_popup.reposition with repositioned + configure (it was ignored, so clients waiting for it stalled); - place popups by their window geometry, so Chrome's client-drawn menu shadow no longer shifts the menu right and down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hikqzveCoytgF4Uyvh |
||
|
|
3454619162 |
Double-click a window's title bar to maximize or restore it
CI / test (push) Failing after 16s
Two left presses on the same title bar within 400ms and 4px of each other toggle maximize, like the title-bar button. A press that turned into a drag never starts a double-click. A tiled window now floats only once the pointer actually moves, so clicking or double-clicking its title bar leaves it in (and restores it to) its tile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hjF2tD2UuaXLzFzrvV |
||
|
|
4fc4a963b4 |
Module settings in each module's right-click menu, and System settings
CI / test (push) Failing after 15s
- New optional WIT export `chandra:desktop/module-config` (wit/plasmoid.wit): config-items (key,
label, choices, current value; no choices = an on/off switch) and set-config. Hosts look it up
by name, so modules without it (or prebuilt ones like Pulse) load as before.
- Right-click a panel module: "Module settings..." (or a greyed "No module settings"), then
"System settings..." (the settings module, Session tab), then Replace with... and Remove widget.
The "Modules..." row is gone; right-clicking empty panel space offers "System settings..." on the
Panel tab instead. Module settings open in the same menu: on/off rows with a check box, choices
under a heading with the current one ticked; clicking applies at once and the menu stays open.
- Choices are saved per module id in state.edn as :module-config {"clock-digital" {"format"
"12-hour"}} (module_config.mbt; not an owned key, so save_state keeps it) and handed back through
set-config whenever the module is loaded. Other instances of the module follow a change.
- Both hosts: wasmer stub (optional exports 8-10, canonical-ABI decoding in wasm_native.mbt) and
host-wasm (chandra:host/plasmoids config-items/set-config, bound with a separate `configurable`
world so the export stays optional).
- Adopted by the digital clock (Time format 24-hour/12-hour, Show date) and the binary clock (Show
seconds); clock-widget now exports module-config.
- Tests: native menu end-to-end (open, pick 12-hour, heading inert, reload keeps it), state.edn
round trip, EDN unit test, wasmer and host-wasm module-config tests, lib/clock settings test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjuApkJR4sVRYDpDLy
|
||
|
|
a7909014b8 |
Dark mode sets the system preference for apps: GTK, browsers, Qt and KDE
CI / test (push) Failing after 16s
In the login session (--drm) the settings module's Dark mode switch, and the saved choice at startup, now also set what other programs follow (compositor/host/system_theme.mbt): - gsettings org.gnome.desktop.interface color-scheme prefer-dark|default: the portal's org.freedesktop.appearance color-scheme, followed by Chrome/Chromium, Electron, Firefox, GTK 4 / libadwaita and Qt 6.5+; - gtk-theme Adwaita <-> Adwaita-dark for GTK 3 (only when it is one of those two); - gtk-application-prefer-dark-theme in gtk-3.0 and gtk-4.0 settings.ini; - KDE color scheme BreezeDark|BreezeLight via plasma-apply-colorscheme, else kwriteconfig6/5 (kdeglobals [General] ColorScheme); - qt6ct/qt5ct: a *-light / *-dark color file is swapped for its counterpart when it exists. Missing tools are skipped. Nested windows and tests leave the system alone (ChandraCompositor::sync_system_theme, set from --drm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3 |
||
|
|
0e6a1257e1 |
Settings module: Session, Desktop and Panel tabs; the module manager moves in
CI / test (push) Failing after 15s
- The settings popup gets a tab bar, split by where things live: Session (the switches), Desktop
(what is drawn on the desktop: the wallpaper list under a "Wallpaper" heading) and Panel (what
the module manager showed: modules in the panel to remove, modules to add, Browse...).
Left/Right or 1/2/3 switch tabs; it reopens on the tab it was left on. Modules can't be placed
on the desktop yet (every wasm module lives in the panel; the desktop card is built in), so
the Desktop tab has no module section until they can.
- The standalone module-manager module and its world are removed; the settings module imports
`modules`. Saved panels listing "module-manager" get the settings module in its place.
- DesktopShell::open_settings(SettingsTab) opens the settings module on a tab (loading it into the
panel if needed), for the panel menu and "System settings" entries; the wasm picker
("Modules..." in the panel menu) is open_settings(Panel).
- Tests: the native picker test drives the Panel tab, the wallpaper and switch tests go through
the tabs, an open_settings test; the wasm and host-wasm module tests use the settings module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3
|
||
|
|
ee019ecbaa |
Settings module: the wallpaper chooser moves in, and a Dark mode switch
CI / test (push) Failing after 16s
- The session settings module becomes the panel's "Settings" button. Its popup lists the session switches, then a "Wallpaper" heading and the wallpapers (current one ticked); a click on a wallpaper shows it at once, as the old chooser did. Up/Down skip the heading. - The standalone wallpaper module and its world are removed. A saved panel.edn that lists "wallpaper" gets the settings module in its place (or just drops it when Settings is there). - New "Dark mode" setting (on by default). Off swaps the compositor to the Moon Day palette (ThemeTokens::moon_day, the values of config/themes/moon-day.json) for the shell, panel modules, window decorations and the switcher; on goes back to the configured theme. Saved in state.edn as :theme :light (absent or :dark: dark) and applied at startup by restore_state. - Tests: the native wallpaper test drives the settings module, the settings test flips Dark mode and checks the theme, the state.edn round trip covers :theme, panel migration unit test, and the host-wasm test covers the switches and the wallpaper rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3 |
||
|
|
a0b878af23 |
Session settings panel module: switch session restore and window placement on or off
CI / test (push) Failing after 16s
- New 'session-settings' capability (wit/capabilities.wit: settings, is-on, set-setting) and 'session-settings' panel module: a "Session" button whose popup lists the session settings, each with an on/off switch. Clicking a row flips it at once (the list stays open); Up/Down move the highlight, Enter or Space flips it, Escape or a click elsewhere closes. In the default panel, between Wallpaper and Log out. - Two settings to start with, kept in state.edn and written only when off (absent means on): "Reopen windows at login" (:restore-session, the key session restore already read) and "Remember window positions" (:remember-windows; when off, floating windows aren't placed where their app was left and new places aren't recorded, but the saved ones are kept). - Served by both hosts: wasmer stub (native; settings table 6, bit mask in host int 3, requests 10/11) and host-wasm (publish-session-settings, set-session-setting request). - Tests: native end-to-end (open, click both rows, keyboard, Escape), a state.edn round trip that checks both settings take effect, and a host-wasm module test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3 |