dotfiles/.local/bin/t

7 lines
138 B
Bash
Executable File

#!/bin/bash
EXISTS=false
tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true
$EXISTS && tmux a -t "$1"
$EXISTS || tmux new -s "$1"