2019-08-15 15:37:37 -07:00
|
|
|
// Retrieve information about screen size, displays, cursor position, etc.
|
|
|
|
//
|
|
|
|
// For more info, see:
|
|
|
|
// https://electronjs.org/docs/api/screen
|
|
|
|
|
|
|
|
const { app, BrowserWindow } = require('electron')
|
|
|
|
|
|
|
|
let mainWindow = null
|
|
|
|
|
2020-02-03 16:43:22 -06:00
|
|
|
app.whenReady().then(() => {
|
2019-08-15 15:37:37 -07:00
|
|
|
// We cannot require the screen module until the app is ready.
|
|
|
|
const { screen } = require('electron')
|
|
|
|
|
|
|
|
// Create a window that fills the screen's available work area.
|
|
|
|
const primaryDisplay = screen.getPrimaryDisplay()
|
|
|
|
const { width, height } = primaryDisplay.workAreaSize
|
|
|
|
|
|
|
|
mainWindow = new BrowserWindow({ width, height })
|
|
|
|
mainWindow.loadURL('https://electronjs.org')
|
2019-10-16 18:17:09 +03:00
|
|
|
})
|