dotfiles/.local/bin/t

7 lines
138 B
Plaintext
Raw Normal View History

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