Skip to content

Commit

Permalink
Fully fix idle detection running when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Jul 8, 2022
1 parent 195a9cc commit d1cda5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -2717,7 +2717,7 @@ function startIdleCheckShort() {
function idleCheckShort() {
const idleTime = powerMonitor.getSystemIdleTime()

if (!userIdleDimmed && settings.detectIdleTime && idleTime >= settings.detectIdleTime) {
if (!userIdleDimmed && settings.detectIdleTime * 1 > 0 && idleTime >= settings.detectIdleTime) {
console.log(`\x1b[36mUser idle. Dimming displays.\x1b[0m`)
userIdleDimmed = true
Object.values(monitors)?.forEach((monitor) => {
Expand Down

0 comments on commit d1cda5c

Please sign in to comment.