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

+19
View File
@@ -431,3 +431,22 @@ interface game-library {
/// Poll the daemon again now.
refresh: func();
}
/// Built-in on-screen keyboard (OSK). The compositor draws the keyboard above the panel and routes
/// keystrokes to focused Wayland clients, panel popups and dialogs; a module with this capability
/// reads whether the keyboard is showing and opens or hides it.
interface osk {
/// Whether the on-screen keyboard is currently visible.
is-visible: func() -> bool;
/// Show (true) or hide (false) the on-screen keyboard.
set-visible: func(visible: bool);
}
/// Display orientation (0°, 90° CW, 180°, 270° CW). The host rotates scanout and input
/// coordinates; a module with this capability reads the current orientation and rotates it.
interface rotation {
/// Current orientation: 0 = 0°, 1 = 90° CW, 2 = 180°, 3 = 270° CW.
current: func() -> u32;
/// Set the orientation (0..3, wrapped modulo 4).
set-rotation: func(rot: u32);
}
+8
View File
@@ -92,6 +92,10 @@ interface plasmoids {
publish-battery: func(percent: s32, state: u32, secs-left: u32);
/// Screenshot state: bit 0 a recording is running, bit 1 recordings show the pointer.
publish-screenshot: func(state: u32);
/// Whether the built-in on-screen keyboard is currently visible.
publish-osk: func(visible: bool);
/// Current display orientation (0 = 0°, 1 = 90° CW, 2 = 180°, 3 = 270° CW).
publish-rotation: func(rot: u32);
record system-snapshot {
cpu-permille: u32,
@@ -181,6 +185,10 @@ interface plasmoids {
game-library(game-request),
/// Power: display backlight brightness percentage (5..100).
set-brightness(s32),
/// The osk capability: show (true) or hide (false) the on-screen keyboard.
set-osk-visible(bool),
/// The rotation capability: set display orientation (0..3).
set-rotation(s32),
}
/// The next pending request, oldest first.
next-request: func() -> option<request>;
+14
View File
@@ -104,6 +104,8 @@ world plasmoid-host {
import default-apps;
import face-unlock;
import game-library;
import osk;
import rotation;
export plasmoid;
}
@@ -178,3 +180,15 @@ world gamerig-library-widget {
import game-library;
export module-config;
}
/// On-screen keyboard toggle button ("KB").
world osk-widget {
include widget;
import osk;
}
/// Display rotation button ("Rot"): rotates 90° clockwise on click.
world rotate-widget {
include widget;
import rotation;
}