diff options
Diffstat (limited to 'battery-status.sh')
| -rwxr-xr-x | battery-status.sh | 10 |
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 } |
