added #{load_avg}
This commit is contained in:
parent
f828eafc2b
commit
8390d37ed8
3 changed files with 27 additions and 1 deletions
24
.tmux.conf
24
.tmux.conf
|
@ -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() {
|
# _split_window() {
|
||||||
# tty=${1:-$(tmux display -p '#{pane_tty}')}
|
# tty=${1:-$(tmux display -p '#{pane_tty}')}
|
||||||
# shift
|
# shift
|
||||||
|
@ -972,6 +986,16 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
||||||
# ;;
|
# ;;
|
||||||
# esac
|
# 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_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')
|
# status_right=$(echo "$status_right" | sed 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #S)%g')
|
||||||
#
|
#
|
||||||
|
|
|
@ -143,8 +143,9 @@ tmux_conf_theme_right_separator_sub='|'
|
||||||
# - #{battery_status}
|
# - #{battery_status}
|
||||||
# - #{battery_vbar}
|
# - #{battery_vbar}
|
||||||
# - #{circled_session_name}
|
# - #{circled_session_name}
|
||||||
# - #{hostname}
|
|
||||||
# - #{hostname_ssh}
|
# - #{hostname_ssh}
|
||||||
|
# - #{hostname}
|
||||||
|
# - #{loadavg}
|
||||||
# - #{pairing}
|
# - #{pairing}
|
||||||
# - #{prefix}
|
# - #{prefix}
|
||||||
# - #{root}
|
# - #{root}
|
||||||
|
|
|
@ -188,6 +188,7 @@ This configuration supports the following builtin variables:
|
||||||
- `#{hostname}`: SSH aware hostname information
|
- `#{hostname}`: SSH aware hostname information
|
||||||
- `#{hostname_ssh}`: SSH aware hostname information, blank when no SSH
|
- `#{hostname_ssh}`: SSH aware hostname information, blank when no SSH
|
||||||
connection detected
|
connection detected
|
||||||
|
- `#{loadavg}`: load average
|
||||||
- `#{pairing}`: is session attached to more than one client?
|
- `#{pairing}`: is session attached to more than one client?
|
||||||
- `#{prefix}`: is prefix being depressed?
|
- `#{prefix}`: is prefix being depressed?
|
||||||
- `#{root}`: is current user root?
|
- `#{root}`: is current user root?
|
||||||
|
|
Loading…
Reference in a new issue