mirror of
https://github.com/tmux-plugins/tmux-continuum.git
synced 2024-12-22 15:48:50 +00:00
Fix num tmux process and continuum status
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.
This commit is contained in:
parent
499b6a7e4e
commit
ec92b3c6b1
@ -6,7 +6,7 @@ source "$CURRENT_DIR/helpers.sh"
|
|||||||
source "$CURRENT_DIR/variables.sh"
|
source "$CURRENT_DIR/variables.sh"
|
||||||
|
|
||||||
print_status() {
|
print_status() {
|
||||||
local save_int="$(get_tmux_option "$auto_save_interval_option")"
|
local save_int="$(get_tmux_option "$auto_save_interval_option" "$auto_save_interval_default")"
|
||||||
local status=""
|
local status=""
|
||||||
local style_wrap
|
local style_wrap
|
||||||
if [ $save_int -gt 0 ]; then
|
if [ $save_int -gt 0 ]; then
|
||||||
|
@ -23,6 +23,8 @@ current_tmux_server_pid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
all_tmux_processes() {
|
all_tmux_processes() {
|
||||||
|
# search for "^tmux " cause there can be some other running scripts,
|
||||||
|
# whose name starts with "tmux" for eg "tmux-mem-cpu-load"
|
||||||
# ignores `tmux source-file .tmux.conf` command used to reload tmux.conf
|
# ignores `tmux source-file .tmux.conf` command used to reload tmux.conf
|
||||||
ps -Ao "command pid" |
|
ps -Ao "command pid" |
|
||||||
\grep "^tmux " |
|
\grep "^tmux " |
|
||||||
|
Loading…
Reference in New Issue
Block a user