mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-26 04:04:35 +00:00
Fix power-profile auto-switch
This commit is contained in:
parent
a0bba2e225
commit
0a9742429d
|
@ -19,6 +19,7 @@ in {
|
|||
systemd.services."power-monitor" = let
|
||||
dependencies = with pkgs; [
|
||||
coreutils
|
||||
gnugrep
|
||||
power-profiles-daemon
|
||||
inotify-tools
|
||||
jaq
|
||||
|
|
|
@ -6,7 +6,7 @@ BAT_CAP="$BAT/capacity"
|
|||
|
||||
POWER_SAVE_PERCENT=50 # Enter power-save mode if on bat and below this capacity
|
||||
|
||||
HAS_PERFORMANCE="$(powerprofilesctl list | grep performance)"
|
||||
HAS_PERFORMANCE="$(powerprofilesctl list | grep "performance" || true)" # the || true ignores grep failing with non-zero code
|
||||
|
||||
# monitor loop
|
||||
prev=0
|
||||
|
|
Loading…
Reference in a new issue