Skip to content

Commit 459c4dc

Browse files
authored
Update main.js
1 parent ff5f98d commit 459c4dc

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

main.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
const { app, BrowserWindow, globalShortcut } = require('electron');
1+
const { app, BrowserWindow, globalShortcut, screen } = require('electron');
22
const path = require('path');
33
const fs = require('fs');
44

55
let mainWindow;
66
let config = { autoLaunch: false, shortcut: 'CommandOrControl+G' };
77

88
function 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

0 commit comments

Comments
 (0)