1
0
Fork 0
mirror of synced 2024-12-22 06:41:07 -05:00

fixed #{battery_bar} auto width (2), fixes #712

This commit is contained in:
Gregory Pakosz 2024-01-22 10:09:49 +01:00
parent b70400e1ee
commit 123ad5c109

View file

@ -173,7 +173,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
#
# if ! printf '' | sed -E 's///' 2>/dev/null; then
# if printf '' | sed -r 's///' 2>/dev/null; then
# sed () {
# sed() {
# n=$#; while [ "$n" -gt 0 ]; do arg=$1; shift; case $arg in -E*) arg=-r${arg#-E};; esac; set -- "$@" "$arg"; n=$(( n - 1 )); done
# command sed "$@"
# }
@ -1399,18 +1399,18 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# -e 's%#\{\?battery_bar%#\{?@battery_percentage%g' \
# -e 's%#\{\?battery_hbar%#\{?@battery_percentage%g' \
# -e 's%#\{\?battery_vbar%#\{?@battery_percentage%g' \
# -e "s%#{battery_bar}%#(nice cut -c3- '$TMUX_CONF' | sh -s _bar '$tmux_conf_battery_bar_palette' '$tmux_conf_battery_bar_symbol_empty' '$tmux_conf_battery_bar_symbol_full' '$tmux_conf_battery_bar_length' '#{@battery_charge}' '#{client_width}')%g" \
# -e "s%#{battery_hbar}%#(nice cut -c3- '$TMUX_CONF' | sh -s _hbar '$tmux_conf_battery_hbar_palette' '#{@battery_charge}'')%g" \
# -e "s%#{battery_vbar}%#(nice cut -c3- '$TMUX_CONF' | sh -s _vbar '$tmux_conf_battery_hbar_palette' '#{@battery_charge}'')%g" \
# -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \
# -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g')
# -e "s%#\{battery_bar\}%#(nice cut -c3- '$TMUX_CONF' | sh -s _bar '$tmux_conf_battery_bar_palette' '$tmux_conf_battery_bar_symbol_empty' '$tmux_conf_battery_bar_symbol_full' '$tmux_conf_battery_bar_length' '#{@battery_charge}' '#{client_width}')%g" \
# -e "s%#\{battery_hbar\}%#(nice cut -c3- '$TMUX_CONF' | sh -s _hbar '$tmux_conf_battery_hbar_palette' '#{@battery_charge}'')%g" \
# -e "s%#\{battery_vbar\}%#(nice cut -c3- '$TMUX_CONF' | sh -s _vbar '$tmux_conf_battery_vbar_palette' '#{@battery_charge}'')%g" \
# -e 's%#\{(\?)?battery_status%#\{\1@battery_status%g' \
# -e 's%#\{(\?)?battery_percentage%#\{\1@battery_percentage%g')
# status_right=$(echo "$status_right" | sed -E \
# -e 's%#\{\?battery_bar%#\{?@battery_percentage%g' \
# -e 's%#\{\?battery_hbar%#\{?@battery_percentage%g' \
# -e 's%#\{\?battery_vbar%#\{?@battery_percentage%g' \
# -e "s%#{battery_bar}%#(nice cut -c3- '$TMUX_CONF' | sh -s _bar '$tmux_conf_battery_bar_palette' '$tmux_conf_battery_bar_symbol_empty' '$tmux_conf_battery_bar_symbol_full' '$tmux_conf_battery_bar_length' '#{@battery_charge}' '#{client_width}')%g" \
# -e "s%#{battery_hbar}%#(nice cut -c3- '$TMUX_CONF' | sh -s _hbar '$tmux_conf_battery_hbar_palette' '#{@battery_charge}'')%g" \
# -e "s%#{battery_vbar}%#(nice cut -c3- '$TMUX_CONF' | sh -s _vbar '$tmux_conf_battery_hbar_palette' '#{@battery_charge}'')%g" \
# -e "s%#\{battery_bar\}%#(nice cut -c3- '$TMUX_CONF' | sh -s _bar '$tmux_conf_battery_bar_palette' '$tmux_conf_battery_bar_symbol_empty' '$tmux_conf_battery_bar_symbol_full' '$tmux_conf_battery_bar_length' '#{@battery_charge}' '#{client_width}')%g" \
# -e "s%#\{battery_hbar\}%#(nice cut -c3- '$TMUX_CONF' | sh -s _hbar '$tmux_conf_battery_hbar_palette' '#{@battery_charge}'')%g" \
# -e "s%#\{battery_vbar\}%#(nice cut -c3- '$TMUX_CONF' | sh -s _vbar '$tmux_conf_battery_vbar_palette' '#{@battery_charge}'')%g" \
# -e 's%#\{(\?)?battery_status%#\{\1@battery_status%g' \
# -e 's%#\{(\?)?battery_percentage%#\{\1@battery_percentage%g')
# status_right="#(echo; nice cut -c3- '$TMUX_CONF' | sh -s _battery_status '$tmux_conf_battery_status_charging' '$tmux_conf_battery_status_discharging')$status_right"