6cb05626544b2b3a5ad94669cb7d8fd8835dd4ba
9
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
63ce79fa7c |
Drop pkg.generated.mbti files the test run left in the last commit
CI / test (push) Successful in 12m25s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf |
||
|
|
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 |
||
|
|
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
|
||
|
|
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
|
||
|
|
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
|
||
|
|
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
|
||
|
|
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 |