File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1- const { app, BrowserWindow, globalShortcut } = require ( 'electron' ) ;
1+ const { app, BrowserWindow, globalShortcut, screen } = require ( 'electron' ) ;
22const path = require ( 'path' ) ;
33const fs = require ( 'fs' ) ;
44
55let mainWindow ;
66let config = { autoLaunch : false , shortcut : 'CommandOrControl+G' } ;
77
88function createWindow ( ) {
9+ const { width, height } = screen . getPrimaryDisplay ( ) . workAreaSize ;
10+
911 mainWindow = new BrowserWindow ( {
10- width : 400 ,
11- height : 500 ,
12+ width : width ,
13+ height : height ,
14+ x : 0 ,
15+ y : 0 ,
16+ fullscreen : true ,
1217 frame : false ,
1318 transparent : true ,
1419 alwaysOnTop : true ,
@@ -23,7 +28,7 @@ function createWindow() {
2328 } ) ;
2429
2530 mainWindow . loadFile ( 'index.html' ) ;
26- mainWindow . setIgnoreMouseEvents ( true ) ; // Make it non-interactive, just overlay
31+ mainWindow . setIgnoreMouseEvents ( true ) ;
2732 mainWindow . hide ( ) ; // Start hidden
2833}
2934
You can’t perform that action at this time.
0 commit comments