-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
131 lines (99 loc) · 3.27 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
# Cheatsheet https://tmuxcheatsheet.com/
# start window index at 1
set -g base-index 1
# start pane index at 1
setw -g pane-base-index 1
# increase scroll-back history
set -g history-limit 10000
# use vim key bindings
setw -g mode-keys vi
# mouse drag won't auto copy
unbind -T copy-mode-vi MouseDragEnd1Pane
# decrease command delay (increases vim responsiveness)
set -sg escape-time 1
# increase repeat timeout
# set -sg repeat-time 100
# xterm-style function key sequences
setw -g xterm-keys on
# Support color for tmux
set -g default-terminal "screen-256color" # Mac and Ubuntu
# set refresh interval for status bar
set -g status-interval 30
# rename window to reflect current program
setw -g automatic-rename on
# renumber windows when a window is closed
set -g renumber-windows on
setw -g window-status-format " #I:#W "
#setw -g window-status-current-format " #I:#W#F "
setw -g window-status-current-format "[ #I:#W ]"
# center the status bar
set -g status-justify left
# show session, window, pane in left status bar
set -g status-left-length 40
set -g status-left '#[fg=green][#S]#[fg=blue] #I:#P#[default] '
# show hostname, date, time, and battery in right status bar
set -g status-right '#[fg=green]#H #(whoami) #[default]%m/%d/%y %I:%M #[fg=red]#(battery discharging)#[default]#(battery charging)'
# set inactive/active window styles
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=colour250,bg=black'
# set color of active pane
# set -g pane-border-fg colour235
# set -g pane-border-bg black
# set -g pane-active-border-fg green
# set -g pane-active-border-bg black
# color status bar
#set -g status-bg colour235
set -g status-bg default
set -g status-fg white
# highlight current window
set -g status-style fg=colour244
set -g window-status-current-style fg=colour222
set -g pane-border-style fg=colour240
set -g pane-active-border-style fg=colour243
# highlight window when it has new activity
setw -g monitor-activity on
# notification for which window has new activity
set -g visual-activity on
# mouse support
#set-option -g mode-mouse on
#set-option -g mouse-select-window on
#set-option -g mouse-select-pane on
#set -g mouse-resize-pane on
set -g mouse on
########## BINDING ##########
# Change prefix from C-b
# unbind-key C-b
set -g prefix C-a
bind C-a send-prefix
# Reload tmux config
bind r source-file ~/.tmux.conf
# Clear scrollback buffer
bind-key k send-keys -R \; send-keys C-l \; clear-history
#bind-key k send-keys -R \; clear-history
# Next window
unbind C-j
bind -n C-j prev
bind -n C-k next
# Navigate panes
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
bind -n M-[ select-pane -t :.+
bind -n M-] select-pane -t :.+
bind -n C-] select-pane -t :.+
# Easy to use split
bind-key - split-window -v
bind-key _ split-window -v
bind-key | split-window -h
bind -n S-Down resize-pane -D 2
bind -n S-Up resize-pane -U 2
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
# bind -r C-K resize-pane -D 2
# bind -n C-J resize-pane -U 2
bind -n C-H resize-pane -L 2
bind -n C-L resize-pane -R 2
# Join pane to another window: window_number.pane_number
#bind-key s command-prompt -p "send pane to:" "join-pane -t '%%' -h"
bind -n C-s command-prompt -p "send pane to:" "join-pane -t '%%' -h"