From: Siraaj Khandkar Date: Fri, 30 Sep 2022 16:46:22 +0000 (-0400) Subject: Switch status to list tmux server and client procs X-Git-Url: https://git.xandkar.net/?p=khome.git;a=commitdiff_plain;h=416c63595d5cc8b1b332b212ec8adf08fa78cc1e Switch status to list tmux server and client procs --- diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 8d6bbd9..f435d19 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -674,11 +674,14 @@ status() { echo 'accounting' - printf '%stmux\n%ssessions %d, clients %d\n' \ + printf '%stmux\n%sservers %d, clients %d\n' \ "$indent_unit" \ "${indent_unit}${indent_unit}" \ - "$(tmux list-sessions 2> /dev/null | wc -l)" \ - "$(tmux list-clients 2> /dev/null | wc -l)" + "$(pgrep -l 'tmux: server' | wc -l)" \ + "$(pgrep -l 'tmux: client' | wc -l)" + # TODO sessions and clients per server + #"$(tmux list-sessions 2> /dev/null | wc -l)" \ + #"$(tmux list-clients 2> /dev/null | wc -l)" echo