From e29d9f63c9487e6849af911c479661c494066326 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 13 Mar 2011 02:50:13 +0100 Subject: tmux: added autoresume by simply using tmux or t --- bashrc/bin/t | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bashrc/bin/t (limited to 'bashrc/bin/t') 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 $@ -- cgit v1.2.3