Open eubnara opened 2 years ago
https://askubuntu.com/questions/385669/lenovo-ideapad-battery-limit
❯ cat battery-limit.sh #!/bin/bash mode_file="/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode" if [[ "$#" == "0" ]];then status=`cat "$mode_file"` if [[ "$status" == "0" ]];then echo "off" elif [[ "$status" == "1" ]];then echo "on" else echo "Unknown status: $status" fi exit 0 fi if [[ "$#" != "1" ]];then echo "Usage: $0 [on|off]" fi if [[ "$1" == "on" ]];then echo 1 | sudo tee "$mode_file" > /dev/null fi if [[ "$1" == "off" ]];then echo 0 | sudo tee "$mode_file" > /dev/null fi
https://askubuntu.com/questions/385669/lenovo-ideapad-battery-limit