aboutsummaryrefslogtreecommitdiffstats
path: root/.local/bin/start-tmux
blob: fa0e1108d93291e9e40e47b952ad961512088f5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

readonly SESSION_NAME="$USER"

main() {
	if ! tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
		tmux new-session -A -s "$SESSION_NAME" -d
	fi
	exec tmux attach-session -t "$SESSION_NAME"
}

main