mirror of
https://github.com/tmux-plugins/tmux-continuum.git
synced 2024-12-22 23:58:48 +00:00
ec92b3c6b1
1) There can be other scripts whose name starts with tmux for eg tmux-mem-cpu-load, because of this the number_tmux_processes_except_current_server returned 2 even though there was only 1 server(which it excludes) and 1 client. 2) By default continuum_status returned off even though the default interval was 15 min.
26 lines
636 B
Bash
Executable File
26 lines
636 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
source "$CURRENT_DIR/helpers.sh"
|
|
source "$CURRENT_DIR/variables.sh"
|
|
|
|
print_status() {
|
|
local save_int="$(get_tmux_option "$auto_save_interval_option" "$auto_save_interval_default")"
|
|
local status=""
|
|
local style_wrap
|
|
if [ $save_int -gt 0 ]; then
|
|
style_wrap="$(get_tmux_option "$status_on_style_wrap_option" "")"
|
|
status="$save_int"
|
|
else
|
|
style_wrap="$(get_tmux_option "$status_off_style_wrap_option" "")"
|
|
status="off"
|
|
fi
|
|
|
|
if [ -n "$style_wrap" ]; then
|
|
status="${style_wrap/$status_wrap_string/$status}"
|
|
fi
|
|
echo "$status"
|
|
}
|
|
print_status
|