Skip to content

Instantly share code, notes, and snippets.

@shuhaowu
Created May 15, 2012 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shuhaowu/2705895 to your computer and use it in GitHub Desktop.
Save shuhaowu/2705895 to your computer and use it in GitHub Desktop.
Thinkpad ACPI Set Stop Charge Script for Ubuntu
#!/bin/bash
echo -ne "Changing stop charge threshold from "
cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh | tr -d "\n"
sudo sh -c "echo $1 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh"
echo -ne " to "
cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment