-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtmux.conf
122 lines (92 loc) · 3.3 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
# status bar
# set-option -g status-utf8 on
set -g status-interval 1
set -g status-justify centre # center align window list
set -g status-left-length 20
set -g status-right-length 340
set -g status-left '#[fg=green]#H #[fg=black]• #[fg=green,bright]#(uname -r | cut -c 1-6)#[default]'
set -g status-right '#[fg=green,bg=black,bright]#(tmux-mem-cpu-load 1) #[fg=red,dim]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d'
# default statusbar colors
set -g status-fg white
set -g status-bg default
set -g status-style bright
set-option -g history-limit 1000000
# default window title colors
set-window-option -g window-status-style fg=white
set-window-option -g window-status-style bg=default
set-window-option -g window-status-style dim
# active window title colors
set-window-option -g window-status-current-style fg=white
set-window-option -g window-status-current-style bg=default
set-window-option -g window-status-current-style bright
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
bind C-y run "tmux show-buffer | xclip -i"
# Start numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
# Use | for vertical splitting and - for horizontal
bind-key v split-window -h
bind-key | split-window -h
bind-key s split-window
bind-key - split-window
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Resize easier
# bind -r w-h resize-pane -L
# bind -r w-j resize-pane -D
# bind -r w-k resize-pane -U
# bind -r w-l resize-pane -R
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# Highlight active window
set-window-option -g window-status-current-style bg=red
# Vi copypaste mode
set-window-option -g mode-keys vi
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# hl for window navigation
unbind-key h
bind -r h previous-window
unbind-key l
bind -r l next-window
# C-hjkl pane traversal
unbind-key C-j
bind -r C-j select-pane -D
unbind-key C-k
bind -r C-k select-pane -U
unbind-key C-h
bind -r C-h select-pane -L
unbind-key C-l
bind -r C-l select-pane -R
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# auto window rename
set-window-option -g automatic-rename on
# set mouse mode fail
set-option -g mouse on
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind a send-prefix
# color
set -g default-terminal "screen-256color"
setw -g xterm-keys on
# easy synchonization
bind e setw synchronize-panes on
bind E setw synchronize-panes off
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# copy past
set-option -g default-command "reattach-to-user-namespace -l zsh"