@@ -11,6 +11,7 @@ import { runInstance } from "#lib/instances/runInstance";
1111import { getAvatar } from "#lib/avatar" ;
1212import * as settings from "#lib/settings" ;
1313import type { InstanceEditOptions } from "#types" ;
14+ import { resourcesPath } from "#lib/constants" ;
1415
1516// declarations for webpack magic constants for built react code
1617declare const MAIN_WINDOW_WEBPACK_ENTRY : string ;
@@ -39,6 +40,10 @@ const createWindow = () => {
3940 webPreferences : {
4041 preload : MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY ,
4142 } ,
43+ icon :
44+ process . platform === "linux"
45+ ? `${ process . resourcesPath } /icon_main.png`
46+ : undefined ,
4247 } ) ;
4348
4449 if ( app . isPackaged ) mainWindow . removeMenu ( ) ;
@@ -74,11 +79,15 @@ app.on("activate", () => {
7479
7580ipcMain . on ( "newInstanceWindow" , ( ) => {
7681 const newInstanceWindow = new BrowserWindow ( {
77- height : 500 ,
82+ height : 550 ,
7883 width : 400 ,
7984 webPreferences : {
8085 preload : NEW_INSTANCE_WINDOW_PRELOAD_WEBPACK_ENTRY ,
8186 } ,
87+ icon :
88+ process . platform === "linux"
89+ ? `${ process . resourcesPath } /icon_main.png`
90+ : undefined ,
8291 } ) ;
8392
8493 if ( app . isPackaged ) newInstanceWindow . removeMenu ( ) ;
@@ -93,6 +102,10 @@ ipcMain.on("editInstanceWindow", async (e, name: string) => {
93102 webPreferences : {
94103 preload : EDIT_INSTANCE_WINDOW_PRELOAD_WEBPACK_ENTRY ,
95104 } ,
105+ icon :
106+ process . platform === "linux"
107+ ? `${ process . resourcesPath } /icon_main.png`
108+ : undefined ,
96109 } ) ;
97110
98111 if ( app . isPackaged ) editWindow . removeMenu ( ) ;
@@ -136,6 +149,10 @@ ipcMain.on("runInstance", (e, name: string) => {
136149 webPreferences : {
137150 preload : RUN_WINDOW_PRELOAD_WEBPACK_ENTRY ,
138151 } ,
152+ icon :
153+ process . platform === "linux"
154+ ? `${ process . resourcesPath } /icon_main.png`
155+ : undefined ,
139156 } ) ;
140157
141158 if ( app . isPackaged ) runWindow . removeMenu ( ) ;
@@ -183,6 +200,10 @@ ipcMain.on("settingsWindow", () => {
183200 webPreferences : {
184201 preload : SETTINGS_WINDOW_PRELOAD_WEBPACK_ENTRY ,
185202 } ,
203+ icon :
204+ process . platform === "linux"
205+ ? `${ process . resourcesPath } /icon_main.png`
206+ : undefined ,
186207 } ) ;
187208
188209 if ( app . isPackaged ) settingsWindow . removeMenu ( ) ;
0 commit comments