-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
70 lines (66 loc) · 4.16 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
# -- general -------------------------------------------------------------------------------------------------
set-option -g default-shell $SHELL # Default shell
set-option -g default-command $SHELL # Default shell
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ',xterm-256color:Tc'
set -s escape-time 1
set -g history-limit 50000
set -g prefix C-a # remap prefix to Control + a
bind C-a send-prefix # bind 'C-a C-a' to type 'C-a'
unbind C-b
bind C-s set-window-option synchronize-panes # Sync panes
bind P pipe-pane -o "cat>>~/#W.log"\; display "Log on ~/#W.log" # Log to file
bind r source-file ~/.tmux.conf \; display "Reloaded!" # Reload
set -g focus-events on
# -- undercurl -------------------------------------------------------------------------------------------------
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# -- display -------------------------------------------------------------------------------------------------
set -g base-index 1 # Base index for windows
set -g pane-base-index 1 # Base index for panes
set -g monitor-activity on
set -g visual-activity off
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g set-titles-string '#h #S #I #W'
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 4000 # slightly longer status messages display time
set -g status-interval 5 # redraw status line every 10 seconds
# -- navigation ----------------------------------------------------------------------------------------------
set-option -g mouse on # Mouse
setw -g mode-keys vi # vi keys
bind h select-pane -L # Move between panes h,j,k,l
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind | split-window -h # Split panes with | and -
bind - split-window -v
bind -r H resize-pane -L 5 # Pane resing H,J,K,L
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind -r C-h select-window -t :- # Quick windows selection
bind -r C-l select-window -t :+
# -- copy mode -----------------------------------------------------------------------------------------------
bind Escape copy-mode
bind C-p run-shell "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
bind C-y run-shell "tmux show-buffer | xclip -sel clip -i"
unbind p
bind p paste-buffer
# -- theme --------------------------------------------------------------------------------------------------
source ~/.dot_files_server/tmux/themes/gruvbox-material-dark.tmux.conf
# -- plugin --------------------------------------------------------------------------------------------------
set -g @plugin 'tmux-plugins/tpm' # List of plugins
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'junegunn/tmux-fzf-url'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'laktak/extrakto'
set -g @plugin 'schasse/tmux-jump'
run '~/.tmux/plugins/tpm/tpm' # Initialize TMUX plugin manager (keep bottom)
run-shell '~/.tmux/plugins/tmux-resurrect/resurrect.tmux'