diff --git a/roles/laptop/files/power_monitor.sh b/roles/laptop/files/power_monitor.sh index 1fd18b2..7322753 100755 --- a/roles/laptop/files/power_monitor.sh +++ b/roles/laptop/files/power_monitor.sh @@ -16,7 +16,7 @@ LOW_BAT_PROFILE="laptop-battery-powersave" [[ -z $STARTUP_WAIT ]] || sleep "$STARTUP_WAIT" # start the monitor loop -prev=0 +prev=$(tuned-adm active | tr -s ' ' | cut -d' ' -f4) while true; do # read the current state @@ -39,6 +39,5 @@ while true; do prev=$profile - # wait for the next power change event - inotifywait -qq "$AC_STATUS" "$BAT_CAP" + sleep 10s done diff --git a/roles/laptop/tasks/tuned.yml b/roles/laptop/tasks/tuned.yml index bc2a74d..0763cdc 100644 --- a/roles/laptop/tasks/tuned.yml +++ b/roles/laptop/tasks/tuned.yml @@ -14,13 +14,6 @@ tags: - tuned -- name: Install inotify-tools - pacman: - name: inotify-tools - state: present - tags: - - tuned - - name: Install power monitor script copy: src: power_monitor.sh