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 || complete -o default -o nospace -F _git g
fi fi


tmux_main(){
if tmux has -t main
tmux(){
if test $# -eq 0
then then
if tmux lsc -t main
if command tmux has -t main
then then
tmux new
command tmux attach -t main
else else
tmux attach -t main
command tmux new -s main
fi fi
else else
tmux new -s main
command tmux "$@"
fi fi
} }




+ 1
- 3
tmux.conf View File

@@ -4,7 +4,7 @@ unbind C-b
set -g prefix C-z set -g prefix C-z
bind-key C-z send-prefix bind-key C-z send-prefix
bind-key C command-prompt "new-window '%%'" 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-command /bin/bash
set -g default-terminal screen-256color set -g default-terminal screen-256color
@@ -22,5 +22,3 @@ set -g status-bg green
if "test `hostname` = newkiwi" "set -g status-bg blue" if "test `hostname` = newkiwi" "set -g status-bg blue"
set -g status-fg white set -g status-fg white


#if "! tmux has -t main" "new-session -d -s main"
#attach -t main

Loading…
Cancel
Save