From 7da5acc4d300d05e22ff679a4f23548c42eea15b Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Fri, 31 Dec 2021 16:01:55 +0100 Subject: [PATCH] Add battery level script --- .bin/check-battery-level | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 .bin/check-battery-level diff --git a/.bin/check-battery-level b/.bin/check-battery-level new file mode 100755 index 0000000..bd968bc --- /dev/null +++ b/.bin/check-battery-level @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +capacityStatus="$(cat /sys/class/power_supply/BAT0/capacity)" + +printf "$capacityStatus%%"