agent: wayland — evdev hotkey backend, download resume, SHA256 integrity
Add kon-hotkey crate with evdev-based global hotkey capture that works on Wayland (and X11). Patterns from whisper-overlay: per-device async listeners, inotify hotplug with udev permission retry, watch channel for live config updates. Frontend detects Wayland at startup and selects evdev or tauri-plugin-global-shortcut automatically. Model downloads now support HTTP Range resume for interrupted downloads and optional SHA256 integrity verification (incremental, no second pass). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,8 @@ pub fn run() {
|
||||
// Store init script for secondary windows (float, viewer)
|
||||
app.manage(PreferencesScript(init_script));
|
||||
|
||||
app.manage(commands::hotkey::HotkeyState::new());
|
||||
|
||||
app.manage(AppState {
|
||||
whisper_engine: Arc::new(LocalEngine::new(
|
||||
EngineName::new("whisper"),
|
||||
@@ -152,6 +154,12 @@ pub fn run() {
|
||||
// Hardware
|
||||
commands::hardware::probe_system,
|
||||
commands::hardware::rank_models,
|
||||
// Hotkey (evdev — Wayland-compatible)
|
||||
commands::hotkey::is_wayland_session,
|
||||
commands::hotkey::check_hotkey_access,
|
||||
commands::hotkey::start_evdev_hotkey,
|
||||
commands::hotkey::update_evdev_hotkey,
|
||||
commands::hotkey::stop_evdev_hotkey,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running Kon");
|
||||
|
||||
Reference in New Issue
Block a user