diff --git a/.tmux.conf b/.tmux.conf index 12e0ee9..3646eb7 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -358,7 +358,9 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # done # ;; # esac -# [ "$count" -ne 0 ] && charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }') || true +# if [ "$count" -ne 0 ]; then +# charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }') +# fi # } # # _battery_status() { @@ -869,8 +871,10 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # # # ignore bindings with errors # if ! tmux source-file "$cfg.in"; then -# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true) -# while ! out=$(tmux source-file "$verbose_flag" "$cfg.in"); do +# if tmux source-file -v /dev/null 2> /dev/null; then +# verbose_flag='-v' +# fi +# while ! out=$(tmux source-file "${verbose_flag:+$verbose_flag}" "$cfg.in"); do # line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2) # perl -n -i -e "if ($. != $line) { print }" "$cfg.in" # done @@ -1504,8 +1508,10 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # # if perl -n -e 'print if /^\s*(?:set|bind|unbind).+?#!important\s*$/' "$TMUX_CONF_LOCAL" 2>/dev/null > "$cfg.local"; then # if ! tmux source-file "$cfg.local"; then -# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true) -# while ! out=$(tmux source-file "$verbose_flag" "$cfg.local"); do +# if tmux source-file -v /dev/null 2> /dev/null; then +# verbose_flag='-v' +# fi +# while ! out=$(tmux source-file "${verbose_flag:+$verbose_flag}" "$cfg.local"); do # line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2) # perl -n -i -e "if ($. != $line) { print }" "$cfg.local" # done