Skip to content

Commit

Permalink
Updated settings variables for "restore" timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Nov 18, 2023
1 parent c810ff7 commit fd54527
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -3415,7 +3415,7 @@ function handleMonitorChange(e, d) {
})

handleChangeTimeout2 = false
}, parseInt(settings.hardwareRestoreTime) || 5000)
}, (settings.hardwareRestoreSeconds ? parseInt(settings.hardwareRestoreSeconds) : 5000))

}

Expand All @@ -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.
)

})
Expand Down Expand 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
Expand Down

0 comments on commit fd54527

Please sign in to comment.