From 51292e49bb8092134df6bb1ca586c23bcd2b1ddf Mon Sep 17 00:00:00 2001 From: davidovki Date: Wed, 1 Mar 2023 00:15:29 +0000 Subject: Add better laptop support --- scripts/battery_level | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 scripts/battery_level (limited to 'scripts/battery_level') 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 -- cgit v1.2.1