From fd54527080978cb30cc540ffb3a2ad7eec1ec91f Mon Sep 17 00:00:00 2001 From: Xander Frangos <33106561+xanderfrangos@users.noreply.github.com> Date: Sat, 18 Nov 2023 16:05:03 -0500 Subject: [PATCH] Updated settings variables for "restore" timeouts --- src/electron.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/electron.js b/src/electron.js index 1310a453..795fb16b 100644 --- a/src/electron.js +++ b/src/electron.js @@ -391,9 +391,9 @@ const defaultSettings = { detectIdleTimeEnabled: false, detectIdleTimeSeconds: 0, detectIdleTimeMinutes: 5, - idleRestoreTime: 0, - wakeRestoreTime: 0, - hardwareRestoreTime: 0, + idleRestoreSeconds: 4, + wakeRestoreSeconds: 8, + hardwareRestoreSeconds: 5, overrideTaskbarPosition: false, overrideTaskbarGap: false, disableWMIC: false, @@ -3415,7 +3415,7 @@ function handleMonitorChange(e, d) { }) handleChangeTimeout2 = false - }, parseInt(settings.hardwareRestoreTime) || 5000) + }, (settings.hardwareRestoreSeconds ? parseInt(settings.hardwareRestoreSeconds) : 5000)) } @@ -3433,7 +3433,7 @@ powerMonitor.on("resume", () => { applyCurrentAdjustmentEvent(true, false) }) }, - parseInt(settings.wakeRestoreTime) || 3000 // Give Windows a few seconds to... you know... wake up. + (settings.wakeRestoreSeconds ? parseInt(settings.wakeRestoreSeconds) * 1000 : 3000) // Give Windows a few seconds to... you know... wake up. ) }) @@ -3565,7 +3565,7 @@ function idleCheckShort() { const foundEvent = applyCurrentAdjustmentEvent(true, true) if (!foundEvent && !settings.disableAutoApply) setKnownBrightness(false) } - }, parseInt(settings.idleRestoreTime) || 3000) + }, (settings.idleRestoreSeconds ? parseInt(settings.idleRestoreSeconds) * 1000 : 3000)) } lastIdleTime = idleTime