-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
138 lines (116 loc) · 4.52 KB
/
tmux.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# .tmux.conf
#----------------------------------------
# remap prefix to Control + j
set -g prefix C-j
# bind 'C-j C-j' to type 'C-j'
bind C-j send-prefix
unbind C-b
# enable mouse click to select a pane
#----------------------------------------
# setw -g mode-mouse on
# setw -g mouse-resize-pane on
# setw -g mouse-select-pane on
# setw -g mouse-select-window on
# setw -g mouse-utf8 on
# setw -g utf8 on
#----------------------------------------
#POST_2.1
#----------------------------------------
set-option -g mouse on
#----------------------------------------
# move and resize panes
bind-key -r j select-pane -D
bind-key -r k select-pane -U
bind-key -r h select-pane -L
bind-key -r l select-pane -R
bind-key -r J resize-pane -D
bind-key -r K resize-pane -U
bind-key -r H resize-pane -L
bind-key -r L resize-pane -R
bind-key -r C-J resize-pane -D 5
bind-key -r C-K resize-pane -U 5
bind-key -r C-H resize-pane -L 5
bind-key -r C-L resize-pane -R 5
# fix mouse selection placing garbage on screen
# (https://www.reddit.com/r/tmux/comments/2xgrf8/garbage_characters_printed_to_screen_after_a/)
set-option -g set-clipboard off
# enable typical xterm keyboard behaviors (like Ctrl+[left|right] to move by words)
set-option -g xterm-keys on
# enable vim keystrokes
setw -g mode-keys vi
bind [ copy-mode
#pre2.7 bind -t vi-copy v begin-selection
#pre2.7 bind -t vi-copy y copy-selection
#pre2.7 bind -t vi-copy V rectangle-toggle
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind ] paste-buffer
# sync panes
bind e setw synchronize-panes on
bind E setw synchronize-panes off
# quick toggle mouse mode
bind m setw -g mode-mouse on
bind M setw -g mode-mouse off
# bind splits
bind s split-window -v
bind v split-window -h
# status bar
setw -g monitor-activity on
set -g visual-activity on
# set history limit to 10,000 lines (could be a problem with lots of panes)
set-option -g history-limit 30000
bind-key -r C-L clear-history
# syncrhonize panes
bind C-x setw synchronize-panes on
bind M-x setw synchronize-panes off
###########################################################################
### Theme
###########################################################################
# from https://learnxinyminutes.com/docs/tmux/
###########################################################################
# Statusbar Color Palette
set-option -g status-justify left
#set-option -g status-bg black
set-option -g status-bg colour235
set-option -g status-fg white
set-option -g status-left-length 40
set-option -g status-right-length 80
# Pane Border Color Palette
#set-option -g pane-active-border-fg yellow
#set-option -g pane-active-border-bg colour238
set-option -g pane-active-border-style fg=yellow,bg=colour238
#set-option -g pane-border-fg colour235
#set-option -g pane-border-bg colour238
set-option -g pane-border-style fg=colour235,bg=colour238
# Message Color Palette
#set-option -g message-fg black
#set-option -g message-bg green
set-option -g message-style fg=black,bg=green
# Window Status Color Palette
#setw -g window-status-fg black
#setw -g window-status-bg yellow
setw -g window-status-style fg=black,bg=yellow
#setw -g window-status-current-fg yellow
#setw -g window-status-current-bg black
setw -g window-status-current-style fg=yellow,bg=black
#setw -g window-status-bell-attr default
#setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red
##setw -g window-status-content-attr default
#setw -g window-status-attr default
##setw -g window-status-content-fg yellow
##setw -g window-status-activity-attr default
#setw -g window-status-activity-attr bold
#setw -g window-status-activity-fg green
#setw -g window-status-activity-bg blue
setw -g window-status-activity-style fg=green,bg=blue
# Automatically set window titles
set-option -g set-titles on
set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
# Statusbar Adjustments
#set -g status-left "#[fg=red] #H#[fg=green]:#[fg=white]#S#[fg=green] |#[default]"
set -g status-left "#[fg=white]#S#[fg=green] |#[default]"
#set -g status-right '#[fg=white]"#T@#h" #[fg=red,bold]#(TZ=America/New_York date +%%H:%%M-%%Z)/#(TZ=GMT date +%%H:%%M-%%Z) #[fg=green,bold]%a %d-%b-%Y'
#set -g status-right '#[fg=white]"#T" #[fg=red,bold]#(TZ=America/New_York date +%%H:%%M-%%Z)/#(TZ=GMT date +%%H:%%M-%%Z) #[fg=green,bold]%a %d-%b-%Y'
set -g status-right '#[fg=red,bold]#(TZ=America/New_York date +%%H:%%M-%%Z)/#(TZ=GMT date +%%H:%%M-%%Z) #[fg=green,bold]%a %d-%b-%Y'
# end