mirror of
1
0
Fork 0

launch _battery_bar() background job only if a battery is present

This commit is contained in:
Gregory Pakosz 2020-02-17 20:20:19 +01:00
parent f7e383460d
commit 98c7467194
1 changed files with 22 additions and 19 deletions

View File

@ -1080,6 +1080,8 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# tmux_conf_battery_status_discharging=$(_decode_unicode_escapes "${tmux_conf_battery_status_discharging:-↓}") # U+2193
#
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _battery_bar' || true
# _battery_info
# if [ "$charge" != 0 ]; then
# case "$status_left $status_right" in
# *'#{battery_status}'*|*'#{battery_bar}'*|*'#{battery_hbar}'*|*'#{battery_vbar}'*|*'#{battery_percentage}'*)
# status_left=$(echo "$status_left" | sed -E \
@ -1099,6 +1101,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# status_right="#(printf '\n'; nice cut -c3- ~/.tmux.conf | sh -s _battery_status \"$tmux_conf_battery_status_charging\" \"$tmux_conf_battery_status_discharging\")$status_right"
# ;;
# esac
# fi
#
# case "$status_left $status_right" in
# *'#{username}'*|*'#{hostname}'*|*'#{username_ssh}'*|*'#{hostname_ssh}'*)