Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 67ab7b1

Browse files
committed
✨ Add 'monitor' settings option - Closes #239
1 parent 0615d5a commit 67ab7b1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/_boot.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,14 @@ fs.readdirSync(innerFontsDir).forEach((e) => {
8080

8181
function createWindow(settings) {
8282
signale.info("Creating window...");
83-
let {x, y, width, height} = electron.screen.getPrimaryDisplay().bounds;
83+
84+
let display;
85+
if (!isNaN(settings.monitor)) {
86+
display = electron.screen.getAllDisplays()[settings.monitor];
87+
} else {
88+
display = electron.screen.getPrimaryDisplay();
89+
}
90+
let {x, y, width, height} = display.bounds;
8491
width++; height++;
8592
win = new BrowserWindow({
8693
title: "eDEX-UI",

0 commit comments

Comments
 (0)