Browse Source

update func tmux

pull/1/head
10sr 12 years ago
parent
commit
0fc3619b22
2 changed files with 7 additions and 9 deletions
  1. +6
    -6
      bashrc
  2. +1
    -3
      tmux.conf

+ 6
- 6
bashrc View File

@@ -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
}



+ 1
- 3
tmux.conf View File

@@ -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

Loading…
Cancel
Save