From 0fc3619b224255be88566718c93ff2b46322309c Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 10 Aug 2012 22:18:40 +0900 Subject: [PATCH] update func tmux --- bashrc | 12 ++++++------ tmux.conf | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bashrc b/bashrc index 9cbe55f..6d28778 100755 --- a/bashrc +++ b/bashrc @@ -183,17 +183,17 @@ then || complete -o default -o nospace -F _git g fi -tmux_main(){ - if tmux has -t main +tmux(){ + if test $# -eq 0 then - if tmux lsc -t main + if command tmux has -t main then - tmux new + command tmux attach -t main else - tmux attach -t main + command tmux new -s main fi else - tmux new -s main + command tmux "$@" fi } diff --git a/tmux.conf b/tmux.conf index f62a472..d8ca385 100644 --- a/tmux.conf +++ b/tmux.conf @@ -4,7 +4,7 @@ unbind C-b set -g prefix C-z bind-key C-z send-prefix bind-key C command-prompt "new-window '%%'" -setw -g mode-keys vi +#setw -g mode-keys vi set -g default-command /bin/bash set -g default-terminal screen-256color @@ -22,5 +22,3 @@ set -g status-bg green if "test `hostname` = newkiwi" "set -g status-bg blue" set -g status-fg white -#if "! tmux has -t main" "new-session -d -s main" -#attach -t main