From a7471fcb3b33408e9720c4f893e1f98237462b42 Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 9 Nov 2024 15:38:17 +0000 Subject: [PATCH] Fix icon for nix systems --- electron/main/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/electron/main/index.ts b/electron/main/index.ts index 2dd5624b..9b5e051a 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -114,9 +114,17 @@ async function createWindow() { } } + const pngSystems: NodeJS.Platform[] = ["linux", "freebsd", "openbsd", "netbsd"] + const icon = join( + process.env.PUBLIC, + pngSystems.includes(process.platform) + ? "favicon-linux.png" + : "favicon.ico", + ) + win = new BrowserWindow(Object.assign({ title: 'heynote', - icon: join(process.env.PUBLIC, 'favicon.ico'), + icon, backgroundColor: nativeTheme.shouldUseDarkColors ? '#262B37' : '#FFFFFF', //titleBarStyle: 'customButtonsOnHover', autoHideMenuBar: true,