summaryrefslogtreecommitdiffstats
path: root/bashrc/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bashrc/bin')
-rwxr-xr-xbashrc/bin/t12
1 files changed, 12 insertions, 0 deletions
diff --git a/bashrc/bin/t b/bashrc/bin/t
new file mode 100755
index 0000000..30c624e
--- /dev/null
+++ b/bashrc/bin/t
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+if [[ "x$1" == x ]] ; then
+ \tmux list-sessions &>/dev/null ||
+ {
+ \tmux new-session -d
+ }
+
+ exec \tmux attach-session -d
+fi
+
+exec \tmux $@