diff --git a/.tmux.conf b/.tmux.conf index cb9db94..9bc28e7 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -237,6 +237,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # } # # _battery() { +# count=0 # charge=0 # uname_s=$(uname -s) # case "$uname_s" in @@ -301,7 +302,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # done # ;; # esac -# charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }') +# [ "$count" -ne 0 ] && charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }') # if [ "$charge" -eq 0 ]; then # tmux set -ug '@battery_status' \;\ # set -ug '@battery_bar' \;\