-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.bash.conf
executable file
·118 lines (102 loc) · 3.79 KB
/
tmux.bash.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# set the default prefix key conbination
# not using Ctrl-a for cursor control
#set prefix C-a
set-option -g prefix C-s
# and unbind C-b is not acceptable to free it up
unbind-key C-b
bind-key C-s send-prefix
set-option -g status-keys vi
set-option -g base-index 1
# unnecessary after v2.6
#set-option -g default-command "reattach-to-user-namespace -l bash"
# start the zshell for each new window
#set-option -g default-command "reattach-to-user-namespace -l zsh"
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
#set -g default-terminal "xterm-256color"
# vim's definition of a horizontal/vertical split is reversed from tmux's
# split vertically default prefix key: %
bind - split-window -v
# split horizantally default prefix key: "
bind | split-window -h
# synchronize panes (Pane들 동시컨트롤)
#bind g setw synchronize-pane
#bind C-a setw synchronize-pane
bind C-s setw synchronize-pane
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes like vim
#bind H resize-pane -L 5
#bind L resize-pane -R 5
#bind J resize-pane -D 5
#bind K resize-pane -U 5
# prompt me for a name for a new window
bind-key C new-window \; command-prompt -p "Name for this new window: " "rename-window '%%'"
# pane movement
bind-key J command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key S command-prompt -p "send pane to:" "join-pane -t '%%'"
# ---------------------
# copy & paste
# ---------------------
# begin copy mode default prefix key: [
# use 'SPACE' to select
# use 'ENTER' to copy
# paste default prefix key: ]
# use vim keybindings in copy mode
set-window-option -g mode-keys vi
# ---------------------
# mouse control
# ---------------------
#setw -g mode-mouse on
#set-option -g mouse-select-pane on
#set-option -g mouse-resize-pane on
#set-option -g mouse-select-window off
# ---------------------
# set status bar
# ---------------------
#set -g status-bg black
#set -g status-fg white
# show window & pane number on left side of status bar
set -g status-left-length 60
#set -g status-left "#[fg=colour240]#H:#I:#P: "
set -g status-left "#[fg=white]#H:#I:#P: "
# show host name, IP, date and time on right side of status bar
set -g status-right-length 50
set -g status-right "#[fg=green]:#h:#[fg=birghtblue]#(ifconfig eth0 | grep 'inet addr:' | awk '{print $2}' | sed 's/addr://'): %D %l:%M %p "
# highlight active window
set-window-option -g window-status-current-bg blue
# xterm-style function key sequences
setw -g xterm-keys on
# ---------------------
# set zenburn config
# ---------------------
setw -g clock-mode-colour colour117
setw -g mode-attr bold
setw -g mode-fg colour117
setw -g mode-bg colour238
set -g status-bg colour235
set -g status-fg colour248
set -g status-attr dim
set -g status-left '#[fg=colour187,bold]#H:#I:#P: '
set -g status-right '#[fg=colour174]#(mpc) #[fg=colour187,bold]%H:%M:%S'
#set -g status-right "#[fg=colour174]:#h:#[fg=colour187]#(ifconfig eth0 | grep 'inet addr:' | awk '{print $2}' | sed 's/addr://'): %D %l:%M %p "
set -g status-right-length 80
setw -g window-status-current-fg colour223
setw -g window-status-current-bg colour237
setw -g window-status-current-attr bold
set -g message-attr bold
set -g message-fg colour117
set -g message-bg colour236
# ---------------------
# show dir on status
# ---------------------
# https://stackoverflow.com/a/35513050
# be sure to see note* below
set -g window-status-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
#set -g window-status-current-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
# status bar updates every 15s by default**, change to 1s here
# (this step is optional - a lower latency might have negative battery/cpu usage impacts)
#set -g status-interval 1