made uptime status update at most every minute or every 'status-interval' seconds
depending on whether '#{uptime_s}' is being used also, stopped updating when no client is attached
This commit is contained in:
parent
94eab29107
commit
8a5ae4f9fc
1 changed files with 8 additions and 1 deletions
|
@ -1164,7 +1164,14 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
|||
# -e 's/#\{(\?)?uptime_h/#\{\1@uptime_h/g' \
|
||||
# -e 's/#\{(\?)?uptime_m/#\{\1@uptime_m/g' \
|
||||
# -e 's/#\{(\?)?uptime_s/#\{\1@uptime_s/g')
|
||||
# status_right="#(cut -c3- ~/.tmux.conf | sh -s _uptime)$status_right"
|
||||
# interval=60
|
||||
# case "$status_left $status_right" in
|
||||
# *'#{@uptime_s}'*)
|
||||
# interval=$(tmux show -gv status-interval)
|
||||
# ;;
|
||||
# esac
|
||||
# pkill -f 'cut -c3- ~/\.tmux\.conf \| sh -s _uptime' || true
|
||||
# status_right="#(printf '\n'; while [ \$(tmux display -p '##{session_attached}') -gt 0 ]; do cut -c3- ~/.tmux.conf | sh -s _uptime; sleep $interval; done)$status_right"
|
||||
# ;;
|
||||
# esac
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue