launch _battery_bar() background job only if a battery is present
This commit is contained in:
parent
f7e383460d
commit
98c7467194
1 changed files with 22 additions and 19 deletions
|
@ -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
|
# 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
|
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _battery_bar' || true
|
||||||
|
# _battery_info
|
||||||
|
# if [ "$charge" != 0 ]; then
|
||||||
# case "$status_left $status_right" in
|
# case "$status_left $status_right" in
|
||||||
# *'#{battery_status}'*|*'#{battery_bar}'*|*'#{battery_hbar}'*|*'#{battery_vbar}'*|*'#{battery_percentage}'*)
|
# *'#{battery_status}'*|*'#{battery_bar}'*|*'#{battery_hbar}'*|*'#{battery_vbar}'*|*'#{battery_percentage}'*)
|
||||||
# status_left=$(echo "$status_left" | sed -E \
|
# 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"
|
# 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
|
# esac
|
||||||
|
# fi
|
||||||
#
|
#
|
||||||
# case "$status_left $status_right" in
|
# case "$status_left $status_right" in
|
||||||
# *'#{username}'*|*'#{hostname}'*|*'#{username_ssh}'*|*'#{hostname_ssh}'*)
|
# *'#{username}'*|*'#{hostname}'*|*'#{username_ssh}'*|*'#{hostname_ssh}'*)
|
||||||
|
|
Loading…
Reference in a new issue