Skip to content

Commit

Permalink
power-monitor: fix initial run (#44)
Browse files Browse the repository at this point in the history
The if statement for the initial run would evaluate to false when on AC power, and no initial profile would be set until status change.
  • Loading branch information
Neurarian authored Sep 30, 2024
1 parent cd2b97d commit 4e05e37
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions home/services/system/power-monitor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
profile="$AC_PROFILE"
fi
# set the new profile
if [ $prevProfile != "$profile" ]; then
echo setting power profile to "$profile"
powerprofilesctl set "$profile"
fi
# set the initial profile
echo setting power profile to "$profile"
powerprofilesctl set "$profile"
prevProfile="$profile"
prevStatus="$currentStatus"
Expand Down

0 comments on commit 4e05e37

Please sign in to comment.