summaryrefslogtreecommitdiffstats
path: root/examples/n-marriott.sh
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-02 20:52:43 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-02 20:52:43 +0000
commitf6b86402c7fd1f4af0e4d163f22e4b9f71b2e538 (patch)
treea477f847000c9037f13df98a2f60065eb7faec30 /examples/n-marriott.sh
parent00c6585e37df01f27e876b4039d22fc9a064c85b (diff)
Remove old examples, add new.
Diffstat (limited to 'examples/n-marriott.sh')
-rw-r--r--examples/n-marriott.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/n-marriott.sh b/examples/n-marriott.sh
new file mode 100644
index 00000000..e1d8ecc5
--- /dev/null
+++ b/examples/n-marriott.sh
@@ -0,0 +1,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