Skip to content

Commit

Permalink
Implement idleTransitionSpeed setting
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Nov 23, 2024
1 parent afd15ad commit 6740399
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -3925,11 +3925,19 @@ function idleCheckShort() {
idleMonitorBlock?.release?.()
idleMonitorBlock = blockBadDisplays("idle:start")
try {
const transitionMonitors = {}
Object.values(monitors)?.forEach((monitor) => {
if(!shouldSkipDisplay(monitor, true)) {
updateBrightness(monitor.id, 0, true, "brightness")
if(settings.idleTransitionSpeed) {
transitionMonitors[monitor.id] = 0
} else {
updateBrightness(monitor.id, 0, true, "brightness")
}
}
})
if(Object.keys(transitionMonitors).length) {
transitionBrightness(0, transitionMonitors, settings.idleTransitionSpeed)
}
} catch (e) {
console.log(`Error dimming displays`, e)
}
Expand Down

0 comments on commit 6740399

Please sign in to comment.