2020-03-20 20:28:31 +00:00
|
|
|
const { app, BrowserWindow } = require('electron');
|
2019-09-05 17:56:06 +00:00
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
const ints = (...args) => args.map(a => parseInt(a, 10));
|
2019-09-05 17:56:06 +00:00
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
const [x, y, width, height] = ints(...process.argv.slice(2));
|
2019-09-05 17:56:06 +00:00
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
let w;
|
2019-09-05 17:56:06 +00:00
|
|
|
|
|
|
|
app.whenReady().then(() => {
|
|
|
|
w = new BrowserWindow({
|
|
|
|
x,
|
|
|
|
y,
|
|
|
|
width,
|
|
|
|
height
|
2020-03-20 20:28:31 +00:00
|
|
|
});
|
|
|
|
console.log('__ready__');
|
|
|
|
});
|
2019-09-05 17:56:06 +00:00
|
|
|
|
|
|
|
process.on('SIGTERM', () => {
|
2020-03-20 20:28:31 +00:00
|
|
|
process.exit(0);
|
|
|
|
});
|