dwmblock-tmuxlist (267B)
1 #!/bin/sh 2 case $BUTTON in 3 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; 4 esac 5 6 n_sessions="$(tmux list-sessions | wc -l)" 7 attached="$(tmux list-sessions | grep '(attached)')" 8 if [ "$n_sessions" -gt 0 ] && [ -z "$attached" ]; then 9 printf " %s" "$n_sessions" 10 fi