-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
131 lines (107 loc) · 3.81 KB
/
dot_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
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'abhinav/tmux-fastcopy'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# default
set-window-option -g window-status-format '#I:#W#F'
source ~/.config/tmux/tmux-colors-solarized/tmuxcolors-256.conf
# bind vi key-mapping
set -g status-keys vi
# navigate using vim-style keys
setw -g mode-keys vi
# vi-style controls for copy mode
set-window-option -g mode-keys vi
# highlight status bar on activity
setw -g monitor-activity on
# set -g visual-activity on # top, pianobar, git and other apps with status mess this up
set -g visual-bell on
# split windows easier
unbind %
bind | split-window -h
bind - split-window -v
# navigate panes with hjkl
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# shift-movement keys will resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# cycle through sessions
bind-key J switch-client -n
bind-key K switch-client -p
# Buffer X -> tmux
bind-key v run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# Buffer tmux -> X
bind-key b run 'tmux show-buffer | xsel -pbsi'
# l now navigates, so o prev window
bind o last-window
# toggle logging
bind-key H pipe-pane -o "exec cat >>$HOME/'#W-tmux.log'" \; display-message 'Toggled logging to $HOME/#W-tmux.log'
# bind r to reloading the config file
bind r source-file ~/.tmux.conf \; display "Reloaded tmux config file."
# tmux-powerline config
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "right"
set-option -g status-left-length 60
set-option -g status-right-length 0
set-option -g status-left "#(~/.config/tmux/tmux-powerline/status-left.sh)"
# set-option -g status-right "#(date '+%D %H:%M')" ## "#(~/.config/tmux/tmux-powerline/status-right.sh)"
# Stop registering ctrl after the key is leg to of
set-option -g escape-time 0
# toggle mouse mode to allow mouse copy/paste
# set mouse on with prefix m
unbind m
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# set mouse off with prefix M
unbind M
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
# zoom this pane to full screen
unbind +
bind + \
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
swap-pane -s tmux-zoom.0 \;\
select-window -t tmux-zoom
# restore this pane
unbind -
bind - \
last-window \;\
swap-pane -s tmux-zoom.0 \;\
kill-window -t tmux-zoom
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# https://github.com/abhinav/tmux-fastcopy
set-option -g set-clipboard on
set-option -g @fastcopy-action 'tmux load-buffer -w -'
# turn on 256 color support in tmux
# set -g default-terminal "screen-256color"
# For alacritty
set -g default-terminal "alacritty"
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # colored underscores
set -as terminal-overrides ',alacritty:RGB' # true-color support
# NVim color settings
set-option -sa terminal-features ',XXX:RGB'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'