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: default to window mode on Windows, show taskbar icon
Louis Beaumontfe9060db3218
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsxindex 7fa34f413..a8df1125c 100644--- a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx+++ b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx@@ -278,6 +278,11 @@ export function createDefaultSettingsObject(): Settings {DEFAULT_SETTINGS.enableAccessibility = true;DEFAULT_SETTINGS.enableInputCapture = true;DEFAULT_SETTINGS.disableOcr = true;+ DEFAULT_SETTINGS.overlayMode = "window";+ }++ if (p === "linux") {+ DEFAULT_SETTINGS.overlayMode = "window";}return DEFAULT_SETTINGS;diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands.rsindex 493bf3a5d..e34e1b350 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs@@ -216,7 +216,14 @@ pub fn update_show_screenpipe_shortcut(}#[cfg(not(target_os = "macos"))]{- if let Some(window) = app_handle.get_webview_window("main") {+ use crate::window_api::main_label_for_mode;+ use crate::store::SettingsStore;+ let mode = SettingsStore::get(app_handle)+ .unwrap_or_default()+ .unwrap_or_default()+ .overlay_mode;+ let label = main_label_for_mode(&mode);+ if let Some(window) = app_handle.get_webview_window(label) {match window.is_visible() {Ok(true) => hide_main_window(app_handle),_ => show_main_window(app_handle, true),diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rsindex fbe62133e..13af728a4 100755--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs@@ -384,20 +384,28 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),}#[cfg(not(target_os = "macos"))]{+ use crate::window_api::main_label_for_mode;+ use crate::store::SettingsStore;+ let mode = SettingsStore::get(app)+ .unwrap_or_default()+ .unwrap_or_default()+ .overlay_mode;+ let label = main_label_for_mode(&mode);+// Debug: list all existing windows- for (label, _) in app.webview_windows() {- info!("existing window: {}", label);+ for (wlabel, _) in app.webview_windows() {+ info!("existing window: {}", wlabel);}- if let Some(window) = app.get_webview_window("main") {- info!("found main window, checking visibility");+ if let Some(window) = app.get_webview_window(label) {+ info!("found {} window, checking visibility", label);match window.is_visible() {Ok(true) => {- info!("main window is visible, hiding it");+ info!("{} window is visible, hiding it", label);hide_main_window(app)}Ok(false) => {- info!("main window exists but not visible, showing it");+ info!("{} window exists but not visible, showing it", label);show_main_window(app, false)}Err(e) => {@@ -406,7 +414,7 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),}}} else {- info!("main window not found, creating it");+ info!("{} window not found, creating it", label);show_main_window(app, false)}}@@ -538,7 +546,14 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),}#[cfg(not(target_os = "macos"))]{- if let Some(window) = app.get_webview_window("main") {+ use crate::window_api::main_label_for_mode;+ use crate::store::SettingsStore;+ let mode = SettingsStore::get(app)+ .unwrap_or_default()+ .unwrap_or_default()+ .overlay_mode;+ let label = main_label_for_mode(&mode);+ if let Some(window) = app.get_webview_window(label) {if !window.is_visible().unwrap_or(false) {show_main_window(app, false);}@@ -1798,6 +1813,9 @@ async fn main() {// but existing panels with MoveToActiveSpace + level 1001 can.// The Chat creation path only configures level/behaviors — it// does NOT activate or show, so no blink or focus-steal here.+ // macOS-only: on Windows/Linux the non-macOS chat builder doesn't+ // set .visible(false), causing a visible chat window on startup.+ #[cfg(target_os = "macos")]if onboarding_store.is_completed {let app_handle_chat = app.handle().clone();tauri::async_runtime::spawn(async move {diff --git a/apps/screenpipe-app-tauri/src-tauri/src/store.rs b/apps/screenpipe-app-tauri/src-tauri/src/store.rsindex b3481b561..ae46a192a 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/store.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/store.rs@@ -240,7 +240,10 @@ fn default_true() -> bool {}fn default_overlay_mode() -> String {- "fullscreen".to_string()+ #[cfg(target_os = "macos")]+ { "fullscreen".to_string() }+ #[cfg(not(target_os = "macos"))]+ { "window".to_string() }}#[derive(Serialize, Deserialize, Type,Clone,Default)]@@ -520,7 +523,10 @@ impl Default for SettingsStore {enable_input_capture: true,enable_accessibility: true,auto_update: true,+ #[cfg(target_os = "macos")]overlay_mode: "fullscreen".to_string(),+ #[cfg(not(target_os = "macos"))]+ overlay_mode: "window".to_string(),show_overlay_in_screen_recording: false,video_quality: "balanced".to_string(),extra: std::collections::HashMap::new(),