|
|
@ -603,6 +603,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' |
|
|
|
# now=$(date +%s) |
|
|
|
# ;; |
|
|
|
# *Linux*|*CYGWIN*|*MSYS*|*MINGW*) |
|
|
|
# boot=0 |
|
|
|
# now=$(cut -d' ' -f1 < /proc/uptime) |
|
|
|
# ;; |
|
|
|
# *OpenBSD*) |
|
|
@ -613,12 +614,16 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' |
|
|
|
# awk -v boot="$boot" -v now="$now" ' |
|
|
|
# BEGIN { |
|
|
|
# uptime = now - boot |
|
|
|
# y = int(uptime / 31536000) |
|
|
|
# dy = int(uptime / 86400) % 365 |
|
|
|
# d = int(uptime / 86400) |
|
|
|
# h = int(uptime / 3600) % 24 |
|
|
|
# m = int(uptime / 60) % 60 |
|
|
|
# s = int(uptime) % 60 |
|
|
|
# |
|
|
|
# system("tmux set -g @uptime_d " d + 0 " \\; " \ |
|
|
|
# system("tmux set -g @uptime_y " y + 0 " \\; " \ |
|
|
|
# "set -g @uptime_dy " dy + 0 " \\; " \ |
|
|
|
# "set -g @uptime_d " d + 0 " \\; " \ |
|
|
|
# "set -g @uptime_h " h + 0 " \\; " \ |
|
|
|
# "set -g @uptime_m " m + 0 " \\; " \ |
|
|
|
# "set -g @uptime_s " s + 0) |
|
|
@ -1145,12 +1150,16 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' |
|
|
|
# case "$status_left $status_right" in |
|
|
|
# *'#{uptime_d}'*|*'#{uptime_h}'*|*'#{uptime_m}'*) |
|
|
|
# status_left=$(echo "$status_left" | sed -E \ |
|
|
|
# -e 's/#\{(\?)?uptime_y/#\{\1@uptime_y/g' \ |
|
|
|
# -e 's/#\{(\?)?uptime_d/#\{\1@uptime_d/g' \ |
|
|
|
# -e '/@uptime_y/ s/@uptime_d/@uptime_dy/g' \ |
|
|
|
# -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=$(echo "$status_right" | sed -E \ |
|
|
|
# -e 's/#\{(\?)?uptime_y/#\{\1@uptime_y/g' \ |
|
|
|
# -e 's/#\{(\?)?uptime_d/#\{\1@uptime_d/g' \ |
|
|
|
# -e '/@uptime_y/ s/@uptime_d/@uptime_dy/g' \ |
|
|
|
# -e 's/#\{(\?)?uptime_h/#\{\1@uptime_h/g' \ |
|
|
|
# -e 's/#\{(\?)?uptime_m/#\{\1@uptime_m/g' \ |
|
|
|
# -e 's/#\{(\?)?uptime_s/#\{\1@uptime_s/g') |
|
|
|