diff options
Diffstat (limited to 'scripts/battery_level')
-rwxr-xr-x | scripts/battery_level | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/battery_level b/scripts/battery_level new file mode 100755 index 0000000..7bc27d1 --- /dev/null +++ b/scripts/battery_level @@ -0,0 +1,4 @@ +#!/bin/sh +full=$(cat /sys/class/power_supply/BAT0/charge_now) +now=$(cat /sys/class/power_supply/BAT0/charge_full) +echo $full / $now \* 100 | bc -l |