From fd20fa9f13223e4acfbbadded9d659ba97fa268c Mon Sep 17 00:00:00 2001 From: "Thomas G. Lopes" Date: Mon, 2 Mar 2026 15:31:40 +0000 Subject: [PATCH] modifications --- pi/files/agent/extensions/pi-done-notify.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pi/files/agent/extensions/pi-done-notify.ts b/pi/files/agent/extensions/pi-done-notify.ts index c980d84..5aaee96 100644 --- a/pi/files/agent/extensions/pi-done-notify.ts +++ b/pi/files/agent/extensions/pi-done-notify.ts @@ -37,16 +37,18 @@ function notifyRemote(): void { } function notifyLocal(): void { - const { execFile } = require("child_process"); + const { execFile, exec } = require("child_process"); if (process.platform === "darwin") { execFile("afplay", [LOCAL_SOUND_MAC]); } else if (process.platform === "linux") { - execFile("paplay", [LOCAL_SOUND_LINUX]); + exec("paplay /usr/share/sounds/freedesktop/stereo/window-attention.oga & notify-send -i ~/.pi/agent/extensions/assets/pi-logo.svg 'Pi' 'Done. Ready for input.'"); } } function sendNotification(): void { - if (isSSH() || REMOTE_HOST) { + // On Mac or SSH session: notify remote Linux + // On Linux locally: notify local + if (process.platform === "darwin" || isSSH()) { notifyRemote(); } else { notifyLocal();