From cede430dc9752f6b0122a2e22f91a1a9a8377c8b Mon Sep 17 00:00:00 2001 From: root Date: Tue, 14 Apr 2026 16:29:58 -0500 Subject: [PATCH] Keep monitor always on and switch Home layout to horizontal 90/10 - Removed ScreenManager idle sleep entirely (constructor no longer starts the idle monitor, setIdleTimeout is now a no-op, unused fields and the private startIdleMonitor method removed). Display never sleeps; the photo frame provides the idle visual instead. - DashboardContent now uses flex-row: calendar 90% wide, todo 10% wide. --- electron/services/ScreenManager.ts | 22 ++++------------------ src/App.tsx | 6 +++--- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/electron/services/ScreenManager.ts b/electron/services/ScreenManager.ts index fe06039..4932070 100644 --- a/electron/services/ScreenManager.ts +++ b/electron/services/ScreenManager.ts @@ -12,10 +12,8 @@ const DBUS_ENV = { export class ScreenManager { private window: BrowserWindow; - private idleTimeout: number = 300000; // 5 minutes default private idleTimer: NodeJS.Timeout | null = null; private isScreenOn: boolean = true; - private lastActivity: number = Date.now(); private screenControlAvailable: boolean = true; private isWayland: boolean = false; @@ -23,7 +21,8 @@ export class ScreenManager { this.window = window; this.detectDisplayServer(); this.setupActivityListeners(); - this.startIdleMonitor(); + // Idle monitor intentionally disabled: monitor stays on; photo frame + // handles the visual idle state instead. } private detectDisplayServer(): void { @@ -44,31 +43,19 @@ export class ScreenManager { // Called from renderer when touch/click detected public handleUserActivity(): void { - this.lastActivity = Date.now(); - // Always try to wake the screen on touch/click - user is actively interacting if (!this.isScreenOn) { this.wakeScreen(); } } - private startIdleMonitor(): void { - this.idleTimer = setInterval(() => { - const idleTime = Date.now() - this.lastActivity; - if (idleTime >= this.idleTimeout && this.isScreenOn && this.screenControlAvailable) { - this.sleepScreen(); - } - }, 30000); // Check every 30 seconds (not 10) to reduce spam - } - private resetIdleTimer(): void { - this.lastActivity = Date.now(); if (!this.isScreenOn) { this.wakeScreen(); } } - setIdleTimeout(timeout: number): void { - this.idleTimeout = timeout; + setIdleTimeout(_timeout: number): void { + // no-op: idle monitor is disabled; monitor stays on } async wakeScreen(): Promise { @@ -164,7 +151,6 @@ export class ScreenManager { } this.isScreenOn = true; - this.lastActivity = Date.now(); this.window.webContents.send('screen:woke'); } catch (error) { console.error('Failed to wake screen:', error); diff --git a/src/App.tsx b/src/App.tsx index 0700957..fc9a912 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -100,14 +100,14 @@ function DashboardContent() { const config = useSettingsStore((state) => state.config); return ( -
+
{config.calendar && ( -
+
)} {config.todoList && ( -
+
)}