Switch status to list tmux server and client procs
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 30 Sep 2022 16:46:22 +0000 (12:46 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 30 Sep 2022 16:46:22 +0000 (12:46 -0400)
home/lib/login_functions.sh

index 8d6bbd9..f435d19 100644 (file)
@@ -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
 
This page took 0.021787 seconds and 4 git commands to generate.