1
0
Fork 0
mirror of synced 2024-11-17 23:15:35 -05:00

moved pkill calls outside of case blocks

otherwise if you change tmux_conf_theme_status_left or tmux_conf_theme_status_right
and remove #{uptime_x}, #{loadavg} or #{battery_xxx} variables you end up with
stray jobs running in the background
This commit is contained in:
Gregory Pakosz 2019-12-22 10:35:42 +01:00
parent eae2cf27fb
commit f7e383460d

View file

@ -1079,6 +1079,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# tmux_conf_battery_status_charging=$(_decode_unicode_escapes "${tmux_conf_battery_status_charging:-↑}") # U+2191
# 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
# case "$status_left $status_right" in
# *'#{battery_status}'*|*'#{battery_bar}'*|*'#{battery_hbar}'*|*'#{battery_vbar}'*|*'#{battery_percentage}'*)
# status_left=$(echo "$status_left" | sed -E \
@ -1094,7 +1095,6 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \
# -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g')
# interval=60
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _battery_bar' || true
# tmux run -b "trap 'exit 0' TERM; while :; do nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\"; sleep $interval; done"
# 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"
# ;;
@ -1115,6 +1115,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# ;;
# esac
#
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _uptime' || true
# case "$status_left $status_right" in
# *'#{uptime_d}'*|*'#{uptime_h}'*|*'#{uptime_m}'*|*'#{uptime_s}'*)
# status_left=$(echo "$status_left" | sed -E \
@ -1137,11 +1138,11 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# interval=$(tmux show -gv status-interval)
# ;;
# esac
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _uptime' || true
# tmux run -b "trap 'exit 0' TERM; while :; do nice cut -c3- ~/.tmux.conf | sh -s _uptime; sleep $interval; done"
# ;;
# esac
#
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _loadavg' || true
# case "$status_left $status_right" in
# *'#{loadavg}'*)
# status_left=$(echo "$status_left" | sed -E \
@ -1149,7 +1150,6 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# status_right=$(echo "$status_right" | sed -E \
# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g')
# interval=$(tmux show -gv status-interval)
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _loadavg' || true
# tmux run -b "trap 'exit 0' TERM; while :; do nice cut -c3- ~/.tmux.conf | sh -s _loadavg; sleep $interval; done"
# ;;
# esac