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