updated bash status bat to print full rather than not charging when battery can't hit 100% anymore

This commit is contained in:
Solomon Laing 2022-06-07 22:18:30 +09:30
parent 11e0e56489
commit 3e69f8937c

View File

@ -1,8 +1,10 @@
#!/bin/bash
current=$(acpi --battery | sed -e 's/%.*//' | sed 's/.*, //')
status="$current%"
state=$(acpi --battery | sed -e 's/,.*//' | sed 's/.*: //')
if [[ "$state" == "Not charging" ]]; then
state="Full"
fi
echo "$current% $state"