summaryrefslogtreecommitdiffstats
path: root/bashrc/bin/t
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-03-13 02:50:13 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2011-03-13 02:50:13 +0100
commite29d9f63c9487e6849af911c479661c494066326 (patch)
treef9f747ebd5102590fefda07947910c23a31e4517 /bashrc/bin/t
parent0887607b7a5d957ff2e3cd91b9cb960e78a63881 (diff)
downloaddotfiles-e29d9f63c9487e6849af911c479661c494066326.tar.gz
dotfiles-e29d9f63c9487e6849af911c479661c494066326.tar.xz
dotfiles-e29d9f63c9487e6849af911c479661c494066326.zip
tmux: added autoresume by simply using tmux or t
Diffstat (limited to '')
-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 $@