From 69e5d4f1cd212548ca5e83b2d5303b6fd19b8190 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Tue, 20 Jun 2023 22:27:35 +0200 Subject: [PATCH] add acer-battery-health-mode script --- laptop/acer-battery-health-mode.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 laptop/acer-battery-health-mode.sh diff --git a/laptop/acer-battery-health-mode.sh b/laptop/acer-battery-health-mode.sh new file mode 100755 index 0000000..16dda3d --- /dev/null +++ b/laptop/acer-battery-health-mode.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +# Using following tool https://github.com/frederik-h/acer-wmi-battery.git + +PROJECT_LOCATION=~/git/acer-wmi-battery + +if [ "$1" == "enable" ]; then + sudo insmod "$PROJECT_LOCATION/acer-wmi-battery.ko" enable_health_mode=1 + echo "Battery health mode enabled" +elif [ "$1" == "disable" ]; then + sudo insmod "$PROJECT_LOCATION/acer-wmi-battery.ko" enable_health_mode=0 + echo "Battery health mode disabled" +else + echo "Please either state 'enable' or 'disable'" +fi