fixed _battery_info() when pmset doesn't report a charge percentage, fixes #512
This commit is contained in:
parent
a63dc5c6a9
commit
4f332e6b17
|
@ -288,7 +288,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# while IFS= read -r line; do
|
||||
# [ -z "$line" ] && continue
|
||||
# discharging=$(printf '%s' "$line" | grep -qi "discharging" && echo "true" || echo "false")
|
||||
# percentage=$(printf '%s' "$line" | grep -E -o '[0-9]+%')
|
||||
# percentage=$(printf '%s' "$line" | grep -E -o '[0-9]+%' || echo "0%")
|
||||
# charge=$(awk -v charge="$charge" -v percentage="${percentage%%%}" 'BEGIN { print charge + percentage / 100 }')
|
||||
# count=$((count + 1))
|
||||
# done << EOF
|
||||
|
|
Loading…
Reference in New Issue