sb

simple bar for dwm
git clone git://git.ckyln.com/sb.git
Log | Files | Refs | README | LICENSE

commit 3f84b5823a9a2279b2d23439b3ca0605dbd1efda
parent 8fe6e39440aa81b46bb826576e4304783ee73468
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue, 26 Nov 2019 01:05:30 +0300

truncated battery function

Diffstat:
Mfunc/sb_battery | 12+++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/func/sb_battery b/func/sb_battery @@ -3,18 +3,12 @@ state() { state="$(cat "/sys/class/power_supply/$BATTERY/status")" - case $state in - Full) printf "=" ;; - Discharging) printf "-" ;; - Charging) printf "+" ;; - *) printf "?" ;; - esac + case $state in Full) printf "=" ;; Discharging) printf "-" ;; + Charging) printf "+" ;; *) printf "?" ;; esac } -capacity() { - tr -d '\n' < "/sys/class/power_supply/$BATTERY/capacity" -} +capacity() { tr -d '\n' < "/sys/class/power_supply/$BATTERY/capacity"; } battery() { [ -z "$BATTERY" ] && BATTERY="BAT0"