1
0
Fork 0
mirror of synced 2024-05-26 20:11:09 -04:00

use awk instead of bc which isn't available on a default Cygwin install

This commit is contained in:
Gregory Pakosz 2015-10-11 17:53:19 +02:00
parent 6a7bdd3efe
commit 3ce560c230

View file

@ -386,7 +386,7 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
# battery_empty_fg=$(echo $battery_palette | cut -d, -f2)
# battery_bg=$(echo $battery_palette | cut -d, -f3)
#
# full=$(printf %.0f $(echo "$charge * $battery_symbol_count" | bc -l))
# full=$(printf %.0f $(awk "BEGIN{print $charge * $battery_symbol_count}"))
# [ $full -gt 0 ] && \
# printf '#[fg=%s,bg=%s]' $battery_full_fg $battery_bg && \
# printf "%0.s$battery_symbol_full" $(seq 1 $full)
@ -406,7 +406,7 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
# eval set -- "$palette"
# palette=$(eval echo $(eval echo $(printf "\\$\{\$(expr %s \* $count / $battery_symbol_count)\} " $(seq 1 $battery_symbol_count))))
#
# full=$(printf %.0f $(echo "$charge * $battery_symbol_count" | bc -l))
# full=$(printf %.0f $(awk "BEGIN{print $charge * $battery_symbol_count}"))
# printf '#[bg=%s]' $battery_bg
# [ $full -gt 0 ] && \
# printf "#[fg=colour%s]$battery_symbol_full" $(echo $palette | cut -d' ' -f1-$full)