mirror of
1
0
Fork 0

made loadavg status update at most every 'status-interval' seconds

also, stopped updating when no client is attached
This commit is contained in:
Gregory Pakosz 2019-07-28 16:07:56 +02:00
parent 8a5ae4f9fc
commit 3676bfc648
1 changed files with 3 additions and 1 deletions

View File

@ -1181,7 +1181,9 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g')
# status_right=$(echo "$status_right" | sed -E \
# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g')
# status_right="#(cut -c3- ~/.tmux.conf | sh -s _loadavg)$status_right"
# interval=$(tmux show -gv status-interval)
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _loadavg' || true
# status_right="#(printf '\n'; while [ \$(tmux display -p '##{session_attached}') -gt 0 ]; do cut -c3- ~/.tmux.conf | sh -s _loadavg; sleep $interval; done)$status_right"
# ;;
# esac
#