From c8fb9352ac79d2ccf3dcdb352840b60e4dcc548a Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 17 Feb 2023 16:16:56 +0100 Subject: add batt to print battery status --- bin/batt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 bin/batt diff --git a/bin/batt b/bin/batt new file mode 100755 index 0000000..a5eb22f --- /dev/null +++ b/bin/batt @@ -0,0 +1,4 @@ +#!/bin/sh +# print battery status +. /sys/class/power_supply/BAT0/uevent && +echo "$POWER_SUPPLY_TYPE $POWER_SUPPLY_STATUS $POWER_SUPPLY_CAPACITY%" -- cgit v1.2.3