diff --git a/bashrc b/bashrc index 9bdd95e..9cbe55f 100755 --- a/bashrc +++ b/bashrc @@ -184,17 +184,18 @@ then fi tmux_main(){ - if tmux has -t main + if tmux has -t main + then + if tmux lsc -t main then - if tmux lsc -t main - tmux new - else - tmux attach -t main - fi + tmux new else - tmux new -s main + tmux attach -t main fi - } + else + tmux new -s main + fi +} __my_moc_state(){ type mocp >/dev/null 2>&1 || return diff --git a/tmux.conf b/tmux.conf index 2d99702..f62a472 100644 --- a/tmux.conf +++ b/tmux.conf @@ -7,8 +7,8 @@ bind-key C command-prompt "new-window '%%'" setw -g mode-keys vi set -g default-command /bin/bash -#set -g default-terminal screen-16color set -g default-terminal screen-256color +#set -g default-terminal screen-16color #set -g status-left "" #set -g status-right "#H | %a, %d %b %Y %T %z #(tmux -V)" @@ -18,6 +18,9 @@ set message-fg yellow set -g set-titles on -set status-fg white -set status-bg green -if "test `hostname` = newkiwi" "set status-bg blue" +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