dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

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