def attached_clients(pl, minimum=1):
 session_output = get_tmux_output(pl, u'list-panes', u'-F', u'#{session_name}')
 if (not session_output):
  return None
 session_name = session_output.rstrip().split(u'\n')[0]
 attached_clients_output = get_tmux_output(pl, u'list-clients', u'-t', session_name)
 attached_count = len(attached_clients_output.rstrip().split(u'\n'))
 return (None if (attached_count < minimum) else str(attached_count))

def attached_clients ( pl , minimum = 1 ) : session_output = get_tmux_output ( pl , u'list-panes' , u'-F' , u'#{session_name}' ) if ( not session_output ) : return None session_name = session_output . rstrip ( ) . split ( u'\n' ) [ 0 ] attached_clients_output = get_tmux_output ( pl , u'list-clients' , u'-t' , session_name ) attached_count = len ( attached_clients_output . rstrip ( ) . split ( u'\n' ) ) return ( None if ( attached_count < minimum ) else str ( attached_count ) )
return the number of tmux clients attached to the currently active session .