summaryrefslogtreecommitdiffstats
path: root/examples/n-marriott.sh
blob: e1d8ecc5538967af430da2c8865b18e93c902f95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh -x

[ ! -z "$TMUX" ] && exit

# I alias this script to "session" in .profile and use it to reconnect to
# the main session (0) on my main tmux server.

SOCKET=/tmp/tmux-1000-main

TMUX="tmux -S $SOCKET"

$TMUX has -s0 2>/dev/null || $TMUX start
$TMUX attach -d -s0