Linux port: first run, packaging, single instance, privacy and wiring
CI / test (push) Has been cancelled
CI / test (push) Has been cancelled
First run and backend - The companion opens without Ollama or a model (OFFLINE / SETUP REQUIRED), opens Settings > Language model and picks the model up once downloaded. - Model, provider and GPU changes apply without restarting (Ollama is restarted when launch settings change); no silent fallback from API mode. - Fatal startup errors are shown in a window; the fallback avatar loads again; the shipped Capri artwork is used when nothing was imported. Packaging and tooling - packaging/arch/PKGBUILD, capri.desktop (KWin ScreenShot2 key), icons, artwork under /usr/share/capri/assets, Gitea Actions CI. - xtask: `icons` and `release-check` (no private data or credentials). Runtime - One instance per data folder (flock + control socket): second launch shows the window; capri stop / restart / toggle / status (JSON, starts nothing) / doctor / setup / diagnostics export / purge. - A foreign program on the Ollama port is refused; an Ollama left behind by Capri is replaced. Privacy and security - No raw Ollama log on disk; API keys are never saved in plaintext (old ones move to the keyring); refused credential notes are stored as [Credentials omitted]; launched apps get an allow-listed environment. Fixes - Stop/Escape silence the voice; saved voice effects apply to replies; settings_control glitch settings apply; distinct KWin cursor scripts; KDE window capture authorized for source builds; Linux wording. - Voice pack references zipped with Windows separators are found. Wired features - Initiatives, request router, resource monitor, "clip that", questions about a snapshot, sleep mode, tap reactions, stopwatch, attachments, Internet mode button, voice-synced subtitles, wake visuals, dictation draft, tray switches, Spotify seek/shuffle/repeat; computer-control planner and classifier follow model switches and API mode. - Approval cards: one shown, 8 queued, deduplicated, cancelled on stop, failure, lock or pause; one Application access switch. Desktop - Compositor detection (no black overlay on i3 without picom), i3lock detection, unsupported desktops reported at startup, screenshot-only control without AT-SPI, fontconfig fallbacks, translatable feature pages with French translations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
73 files changed
+4834
-517
No files matched your search
@@ -235,6 +235,23 @@ impl Awareness {
|
||||
});
|
||||
}
|
||||
Desktop::X11(x) => {
|
||||
// Screen lockers started directly (i3 key binding, xss-lock without logind)
|
||||
// never tell logind: watch for their process.
|
||||
let (emit4, cancel4, filter4) = (emit.clone(), cancel.clone(), filter.clone());
|
||||
tokio::spawn(async move {
|
||||
let mut locked = false;
|
||||
while !cancel4.is_cancelled() {
|
||||
let now = screen_locker_running();
|
||||
if now != locked {
|
||||
locked = now;
|
||||
if !now {
|
||||
filter4.lock().reset();
|
||||
}
|
||||
emit4(Event::new(if now { Kind::SessionLock } else { Kind::SessionUnlock }));
|
||||
}
|
||||
tokio::time::sleep(Duration::from_secs(2)).await;
|
||||
}
|
||||
});
|
||||
let (x, filter2, emit2, cancel2) = (x.clone(), filter.clone(), emit.clone(), cancel.clone());
|
||||
tokio::spawn(async move {
|
||||
while !cancel2.is_cancelled() {
|
||||
@@ -298,6 +315,20 @@ fn active_window(x: &X11) -> Option<(u32, u32, bool)> {
|
||||
Some((window, x.pid_of(window), fullscreen))
|
||||
}
|
||||
|
||||
/// X11 screen lockers that do not report to logind.
|
||||
const SCREEN_LOCKERS: [&str; 8] = ["i3lock", "i3lock-color", "xsecurelock", "slock", "xlock", "xtrlock", "physlock", "sxlock"];
|
||||
|
||||
/// A screen locker of this user is running.
|
||||
pub fn screen_locker_running() -> bool {
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
let uid = unsafe { libc::getuid() };
|
||||
std::fs::read_dir("/proc").into_iter().flatten().flatten().any(|entry| {
|
||||
entry.file_name().to_str().is_some_and(|n| n.bytes().all(|b| b.is_ascii_digit()))
|
||||
&& entry.metadata().is_ok_and(|m| m.uid() == uid)
|
||||
&& std::fs::read_to_string(entry.path().join("comm")).is_ok_and(|comm| SCREEN_LOCKERS.contains(&comm.trim()))
|
||||
})
|
||||
}
|
||||
|
||||
fn spawn_idle<F, Fut>(cancel: CancellationToken, emit: Arc<impl Fn(Event) + Send + Sync + 'static>, probe: F)
|
||||
where
|
||||
F: Fn() -> Fut + Send + 'static,
|
||||
|
||||
Reference in new issue
Block a user