From 2ca1cb34b2a22802c9bd32a1c9c5fed898818244 Mon Sep 17 00:00:00 2001 From: taohe Date: Sat, 13 Jun 2026 11:38:49 +0800 Subject: [PATCH] Use dinosaur icon for Electron dock --- taskboard-electron/src/main.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/taskboard-electron/src/main.ts b/taskboard-electron/src/main.ts index ad1547b..50d71f9 100644 --- a/taskboard-electron/src/main.ts +++ b/taskboard-electron/src/main.ts @@ -22,6 +22,10 @@ let backendProcess: ChildProcess | null = null; let backendWatcher: FSWatcher | undefined; let rendererWatcher: FSWatcher | undefined; +function getAppIconPath(): string { + return path.join(app.getAppPath(), "assets", "agentforge.png"); +} + function getBackendCommand(): BackendCommand { if (app.isPackaged) { // Single-file binary produced by `bun build --compile`. @@ -249,7 +253,7 @@ const createWindow = () => { height: 800, minWidth: 900, minHeight: 600, - icon: path.join(app.getAppPath(), "assets", "agentforge.png"), + icon: getAppIconPath(), titleBarStyle: "hiddenInset", webPreferences: { preload: path.join(__dirname, "preload.js"), @@ -273,6 +277,10 @@ ipcMain.handle("select-directory", async () => { }); app.whenReady().then(() => { + if (process.platform === "darwin") { + app.dock.setIcon(getAppIconPath()); + } + powerSaveBlocker.start("prevent-app-suspension"); const mainWindow = createWindow();