home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

tm.sh (289B)


      1 #!/bin/sh
      2 tm() {
      3   if [ -z $1 ]; then
      4     tmux switch-client -l
      5   else
      6     if [ -z "$TMUX" ]; then
      7       tmux new-session -As $1
      8     else
      9       if ! tmux has-session -t $1 2>/dev/null; then
     10         TMUX= tmux new-session -ds $1
     11       fi
     12       tmux switch-client -t $1
     13     fi
     14   fi
     15 }
     16 
     17 tm $1