summaryrefslogtreecommitdiff
path: root/battery-status.sh
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2023-08-05 23:48:19 +0500
committerAnton Bobov <anton@bobov.name>2023-08-05 23:48:19 +0500
commit7fb714fadb768401b251a7584d76f216acf5943a (patch)
treed1f85b5d5e74ac1c45ec4b956e8e851ce9469d6f /battery-status.sh
parentb25a5b794be7093dbcd556fcab2ebc50bb33e8b2 (diff)
Update scripts
Diffstat (limited to 'battery-status.sh')
-rwxr-xr-xbattery-status.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/battery-status.sh b/battery-status.sh
index 8b7a057..3c4ac28 100755
--- a/battery-status.sh
+++ b/battery-status.sh
@@ -8,15 +8,15 @@ print_status() {
[ $print_sepparator = true ] && printf ' '
case "$status" in
- "Full")
+ "Full"|"Not charging")
return;;
"Discharging")
- status="-";;
+ status="↓";;
"Charging")
- status="+";;
+ status="↑";;
"Unknown")
# Probably rich the threshold
- if [ $(echo "$current_charge > 50" | bc -l) == 1 ] ; then
+ if [ "$(echo "$current_charge > 50" | bc -l)" == 1 ] ; then
return
fi
status="?"
@@ -25,7 +25,7 @@ print_status() {
status="?";;
esac
- printf '%s %.0f%s' $(basename $bat) $current_charge "$status"
+ printf '%s %.0f%s' "$(basename "$bat")" "$current_charge" "$status"
print_sepparator=true
}