YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: reposition shortcut reminder on display change
Louis Beaumont495b6e99fa2e
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lockindex 8baccae99..559442a32 100755--- a/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -5629,7 +5629,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"[[package]]name = "screenpipe-app"-version = "2.0.25"+version = "2.0.27"dependencies = ["anyhow","async-stream",diff --git a/screenpipe-app-tauri/src-tauri/src/commands.rs b/screenpipe-app-tauri/src-tauri/src/commands.rsindex 48a587fdf..0928991fb 100644--- a/screenpipe-app-tauri/src-tauri/src/commands.rs+++ b/screenpipe-app-tauri/src-tauri/src/commands.rs@@ -467,6 +467,27 @@ pub async fn show_shortcut_reminder(let _ = window.show();}+ // Listen for display changes and reposition window to stay top-center+ let app_handle_clone = app_handle.clone();+ window.on_window_event(move |event| {+ if let tauri::WindowEvent::ScaleFactorChanged { .. } = event {+ // Display configuration changed, reposition to top center of primary monitor+ if let Ok(Some(monitor)) = app_handle_clone.primary_monitor() {+ let screen_size = monitor.size();+ let scale_factor = monitor.scale_factor();+ let new_x = ((screen_size.width as f64 / scale_factor) - 180.0) / 2.0;+ let new_y = 12.0;++ if let Some(window) = app_handle_clone.get_webview_window("shortcut-reminder") {+ let _ = window.set_position(tauri::Position::Logical(+ tauri::LogicalPosition::new(new_x, new_y)+ ));+ info!("Repositioned shortcut-reminder after display change");+ }+ }+ }+ });+// Send the shortcut info to the windowlet _ = app_handle.emit_to(label, "shortcut-reminder-update", &shortcut);