[object Object]

← back to Desktop Dotbar

keep desktop bar supervised by launchd

5bfe0b0f411da3cca7cc6e277d1773f597035242 · 2026-09-17 08:29:12 -0700 · Steve Abrams

Files touched

Diff

commit 5bfe0b0f411da3cca7cc6e277d1773f597035242
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Sep 17 08:29:12 2026 -0700

    keep desktop bar supervised by launchd
---
 start-bar.command | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/start-bar.command b/start-bar.command
index 981019b..979977c 100755
--- a/start-bar.command
+++ b/start-bar.command
@@ -5,6 +5,8 @@
 set -u
 DIR="$HOME/Projects/desktop-dotbar"
 cd "$DIR" || exit 1
+# launchd has a minimal PATH; Electron's launcher uses /usr/bin/env node.
+export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
 
 # tear down any previous instance (electron + this app's node server)
 pkill -f "desktop-dotbar/electron-main.js" 2>/dev/null
@@ -24,6 +26,7 @@ for i in $(seq 1 40); do
 done
 echo "server on :$(cat "$DIR/.port" 2>/dev/null)"
 
-# 2) float the Electron strip
-nohup "$DIR/node_modules/.bin/electron" "$DIR" >"$DIR/bar.log" 2>&1 &
+# 2) float the Electron strip. Keep this launcher attached to Electron so
+# launchd can supervise the bar instead of treating the script as finished.
 echo "dot bar launching… (close this window)"
+exec "$DIR/node_modules/.bin/electron" "$DIR" >>"$DIR/bar.log" 2>&1

← 8db4601 wire arrange bar to master router  ·  back to Desktop Dotbar  ·  dotbar (TK-11885): edge auto-hide + top/left/right orientati 62b3811 →