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

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

No files matched your search

+2 -1
View File
@@ -12,6 +12,7 @@
chandra-ctl screenshot [PATH] save a full-screen PNG directly without opening the editor
chandra-ctl rotate [ARG] rotate/flip display (cw, ccw, flip, 0, 90, 180, 270, status)
chandra-ctl screen [ARG] turn display off/on (on, off, toggle, status)
chandra-ctl lock [ARG] lock session or configure lock-on-blank (lock, status, on-blank [on|off|status])
chandra-ctl brightness [ARG] get/set backlight brightness percent (5..100, status)
chandra-ctl volume [ARG] get/set audio volume (up, down, mute, unmute, toggle, PCT, status)
chandra-ctl osk [ARG] enable/disable/query on-screen keyboard (on, off, toggle, status)
@@ -33,7 +34,7 @@ import os
import socket
import sys
USAGE = "usage: chandra-ctl [--socket PATH] [--quiet] {reload [NAME] | list | ping | shortcut ID | kiosk [lock|unlock|status] | launch ID | windows | screenshot [PATH] | rotate [ARG] | screen [ARG] | brightness [ARG] | volume [ARG] | osk [ARG] | status | refresh | settings [TAB] | auth-demo [MODE] | auth-status | help}"
USAGE = "usage: chandra-ctl [--socket PATH] [--quiet] {reload [NAME] | list | ping | shortcut ID | kiosk [lock|unlock|status] | launch ID | windows | screenshot [PATH] | rotate [ARG] | screen [ARG] | lock [ARG] | brightness [ARG] | volume [ARG] | osk [ARG] | status | refresh | settings [TAB] | auth-demo [MODE] | auth-status | help}"
def runtime_dir():
+2
View File
@@ -85,6 +85,7 @@ targets = [
"/usr/share/xsessions/chandra-x11.desktop",
"/usr/share/xdg-desktop-portal/portals/chandra.portal",
"/usr/share/xdg-desktop-portal/chandra-portals.conf",
"/usr/share/polkit-1/actions/org.chandra.unlock.policy",
]
if os.geteuid() != 0:
@@ -225,6 +226,7 @@ if os.path.isdir(cam_ipa_src):
for fn in sorted(os.listdir(cam_ipa_src)):
if fn.endswith(".yaml"):
put(os.path.join(cam_ipa_src, fn), os.path.join(cam_ipa_dst, fn), 0o644)
put(os.path.join(root, "compositor/polkit/org.chandra.unlock.policy"), "/usr/share/polkit-1/actions/org.chandra.unlock.policy", 0o644)
put(os.path.join(root, "camera/chandra-camera.desktop"), "/usr/share/applications/chandra-camera.desktop", 0o644)
put(os.path.join(root, "camera/chandra-camera.svg"), "/usr/share/icons/hicolor/scalable/apps/chandra-camera.svg", 0o644)
remote_srcs = [