added #{load_avg}

This commit is contained in:
Yang Tang
2016-11-04 20:40:17 +01:00
committed by Gregory Pakosz
parent f828eafc2b
commit 8390d37ed8
3 changed files with 27 additions and 1 deletions
+24
View File
@@ -524,6 +524,20 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# }'
# }
#
# _loadavg() {
# case $(uname -s) in
# *Darwin*)
# tmux set -g @loadavg $(sysctl -q -n vm.loadavg | cut -d' ' -f2)
# ;;
# *Linux*)
# tmux set -g @loadavg $(cut -d' ' -f1 < /proc/loadavg)
# ;;
# *OpenBSD*)
# tmux set -g @loadavg $(sysctl -q -n vm.loadavg | cut -d' ' -f1)
# ;;
# esac
# }
#
# _split_window() {
# tty=${1:-$(tmux display -p '#{pane_tty}')}
# shift
@@ -972,6 +986,16 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# ;;
# esac
#
# case "$status_left $status_right" in
# *'#{loadavg}'*)
# status_left=$(echo "$status_left" | sed -E \
# -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"
# ;;
# esac
#
# status_left=$(echo "$status_left" | sed 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #S)%g')
# status_right=$(echo "$status_right" | sed 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #S)%g')
#