-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
130 lines (104 loc) · 4.93 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
# reload config file (change file location to your the tmux.conf you want to use)
bind-key M-r source-file ~/.tmux.conf
# prefix
# set-option -g prefix2 C-b
set-option -g prefix C-j
# changing bash shell behaviour to be a non-login shell
#set-option -g default-command "exec bash"
# History limits
set-option -g history-limit 10000
## Terminal identification
set-option -g default-terminal "screen-256color"
#set-option -g default-terminal "screen"
# adding Ms to TERM capabilities
# set-option -as terminal-features ',xterm-256color:clipboard'
set-option -as terminal-overrides ',xterm-256color:Ms=\E]52;%p1%s;%p2%s\007'
set-option -as terminal-overrides ',screen-256color:Ms=\E]52;%p1%s;%p2%s\007'
# switch panes using Shift-arrow without prefix
bind-key -n S-Left select-pane -L
bind-key -n S-Right select-pane -R
bind-key -n S-Up select-pane -U
bind-key -n S-Down select-pane -D
bind-key -n M-Right next-window
bind-key -n M-Left previous-window
#resizing panes with alt/shift arrows
bind-key -n -N 'resize pane left' S-M-Left resize-pane -L
bind-key -n -N 'resize pane right' S-M-Right resize-pane -R
bind-key -n -N 'resize pane up' S-M-Up resize-pane -U
bind-key -n -N 'resize pane down' S-M-Down resize-pane -D
# Swap windows across themselves
#bind-key -r -N 'swap window left' C-'<' swap-window -t -1 -d
#bind-key -r -N 'swap window right' C-'>' swap-window -t +1 -d
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
### Enable mouse mode (tmux 2.1 and above)
#set-option -g mouse on
bind-key m set-option mouse\; display-message "Mouse is now #{?mouse,on,off}"
bind-key -n DoubleClick1Pane select-pane \; copy-mode \; send-keys -X clear-selection \; send-keys -X select-word \; send-keys -X copy-selection-no-clear \; copy-mode -q
#bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip"
# similarly, I believe only needed for keyboard based copies:
#bind-key -T copy-mode C-w send-keys -X copy-pipe-and-cancel "xclip"
#bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel "xclip"
# Do not cancel scrollback after copy
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection
bind-key -T copy-mode C-w send-keys -X copy-selection
# Enter copy mode with Alt-pgup
bind-key -n M-PgUp copy-mode
# Rectangle select
bind-key -T copy-mode 'r' send -X rectangle-toggle
# set window and pane index to 1 (0 by default)
set-option -g base-index 1
set-option -w -g pane-base-index 1
## visual and sound notification
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-option -w -g monitor-activity off
set-option -g bell-action none
## Switch off automatic window renaming
set-option -w -g automatic-rename off
######################
### DESIGN CHANGES ###
######################
#window mode (selection)
set-option -w -g mode-style bg=colour6,fg=colour0
#set-option inactive/active window styles
#set-option -g window-style 'fg=colour247,bg=colour236'
#set-option -g window-active-style 'fg=colour250,bg=black'
# set-option the pane border colors
#set-option -g pane-border-style 'fg=colour235,bg=colour238'
#set-option -g pane-active-border-style 'fg=colour51,bg=colour236'
# window status
set-option -w -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
set-option -w -g window-status-style fg=colour138,bg=colour235,none
set-option -w -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
set-option -w -g window-status-current-style fg=colour81,bg=colour238,bold
# bell style?
set-option -w -g window-status-bell-style fg=colour255,bg=colour1,bold
# The panes
set-option -g pane-border-style bg=colour235,fg=colour238
set-option -g pane-active-border-style bg=colour236,fg=colour51
# The messages
set-option -g message-style fg=colour232,bg=colour166,bold
# The statusbar
set-option -g status-position bottom
set-option -g status-style bg=colour234,fg=colour137,dim
set-option -g status-interval 5
set-option -g status-right-length 53
set-option -g status-left-length 20
set-option -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241]#(read one five fifteen other < /proc/loadavg ; printf " $one|$five|$fifteen") \
#[fg=colour233,bg=colour245,bold]#(TZ="Europe/Copenhagen" date +%%H:%%M:%%S)'
#set -g status-right '#[fg=colour233,bg=colour241] \
# #(freemem.sh) \
# #[fg=colour233,bg=colour245] \
# #(read one five fifteen other < /proc/loadavg ; echo $one\|$five\|$fifteen) \
# #[fg=colour233,bg=colour241,bold] \
# #(TZ="Europe/Copenhagen" date +%%d/%%m) \
# #[fg=colour233,bg=colour245,bold] \
# #(TZ="Europe/Copenhagen" date +%%H:%%M:%%S) '
#(tmux-mem-cpu-load --mem-mode 2 --graph-lines 5 --interval 2)\
#(free | grep Mem | awk '{ printf("%.1f\n", $3/$2 * 100.0) }') \
# # save sessions
run-shell ~/.config/tmux/tmux-resurrect/resurrect.tmux
# run-shell ~/.config/tmux/tmux-continuum/continuum.tmux