summaryrefslogtreecommitdiff
path: root/bat
diff options
context:
space:
mode:
Diffstat (limited to 'bat')
-rwxr-xr-xbat16
1 files changed, 0 insertions, 16 deletions
diff --git a/bat b/bat
deleted file mode 100755
index 071bb20..0000000
--- a/bat
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-ac_online=$(cat /sys/class/power_supply/AC/online)
-
-if [ "x$ac_online" = "x1" ] ; then
- echo "On power"
-fi
-
-for bat in /sys/class/power_supply/BAT? ; do
- status=$(cat "$bat/status")
- energy_full=$(cat "$bat/energy_full")
- energy_now=$(cat "$bat/energy_now")
- current_charge=$(bc <<< "scale=2; $energy_now / $energy_full * 100")
-
- printf '%s: %.0f%%\n' $(basename $bat) $current_charge
-done