1#!/bin/zsh
2SESSION_NAME="default"
3
4# Check if the session already exists
5tmux has-session -t $SESSION_NAME 2>/dev/null
6
7if [ $? -eq 0 ]; then
8 # If the session exists, reattach to it
9 tmux attach-session -t $SESSION_NAME
10else
11 # If the session doesn't exist, start a new one
12 tmux new-session -s $SESSION_NAME -d
13 tmux attach-session -t $SESSION_NAME
14fi
15
16$SHELL
17