Skip to content

Commit

Permalink
You can set the start after time to 0
Browse files Browse the repository at this point in the history
Fixes #136
  • Loading branch information
OrangeJedi committed Mar 24, 2023
1 parent 24a7ac3 commit 79c58f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1001,10 +1001,11 @@ function lockComputer() {

//idle startup timer
function launchScreensaver() {
let startAfter = store.get('startAfter');
//console.log(screens.length,powerMonitor.getSystemIdleTime(),store.get('startAfter') * 60)
if (screens.length === 0 && !suspend && !isComputerSleeping && !isComputerSuspendedOrLocked) {
if (screens.length === 0 && !suspend && !isComputerSleeping && !isComputerSuspendedOrLocked && startAfter > 0) {
let idleTime = powerMonitor.getSystemIdleTime();
if (powerMonitor.getSystemIdleState(store.get('startAfter') * 60) === "idle" && getWakeLock()) {
if (powerMonitor.getSystemIdleState(startAfter * 60) === "idle" && getWakeLock()) {
if (!store.get("runOnBattery")) {
if (powerMonitor.isOnBatteryPower()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion web/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h3>General Settings</h3>
<div class="w3-display-container cardContent" style="padding: 2%">
<label for="startAfter">Start Aerial After</label>
<input style="width: 10%; display: inline !important;" class="w3-input" type="number"
id="startAfter" onchange="updateSetting('startAfter','number')">
id="startAfter" onchange="updateSetting('startAfter','number')" min=0>
minutes
<br><br>
<input type="checkbox" id="blankScreen" class="w3-check"
Expand Down

0 comments on commit 79c58f3

Please sign in to comment.