-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
115 lines (86 loc) · 3.92 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
# -- general -------------------------------------------------------------------
# set -g default-terminal "screen-256color" # colors!
# set-option -ga terminal-overrides ",screen-256color:RGB"
# set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # this is for the cursor shape
# set-option -ga terminal-overrides ",screen-256color:RGB"
# set -g default-terminal "xterm-256color"
set-option -g default-terminal "screen-256color"
# set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # this is for the cursor shape
# set-option -ga terminal-overrides ",$TERM:RGB"
set -ag terminal-overrides ",$TERM:RGB"
# set -g default-terminal "tmux-256color"
# set -ag terminal-overrides ",$TERM:RGB"
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
set -g mouse on
setw -q -g utf8 on
# set -g default-command "reattach-to-user-namespace -l $SHELL"
set -g history-limit 100000 # boost history
# edit configuration
bind C-e new-window -n '~/.tmux.conf' "sh -c '\${EDITOR:-vim} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'"
# reload configuration
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
# -- display -------------------------------------------------------------------
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
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 '#{window_name}: #{pane_title}'
set -g display-panes-time 1000 # slightly longer pane indicators display time
set -g display-time 2500 # slightly longer status messages display time
set -g status-interval 30 # redraw status line every 10 seconds
# clear both screen and history
bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history
bind C-l send-keys C-l \; run 'sleep 0.1' \; clear-history
# activity
set -g monitor-activity on
set -g visual-activity off
# -- navigation ----------------------------------------------------------------
# synchronize panes
bind C-q set-window-option synchronize-panes
# split current window horizontally
bind - split-window -v -c '#{pane_current_path}'
bind | split-window -h -c '#{pane_current_path}'
bind c new-window -c "#{pane_current_path}"
bind x kill-pane
# pane navigation
setw -g mode-keys vi
bind -r h select-pane -L # move left
bind -r k select-pane -U # move up
bind -r j select-pane -D # move down
bind -r l select-pane -R # move right
bind-key -n M-S-Left swap-window -t -1\; select-window -t -1 # swap current pane with the previous one
bind-key -n M-S-Right swap-window -t +1\; select-window -t +1 # swap current pane with the next one
# pane resizing
bind -r H resize-pane -L 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
# window navigation
bind / last-window
# -- copy mode -----------------------------------------------------------------
bind-key -n -T copy-mode-vi Enter send-keys -X copy-pipe 'pbcopy'
bind-key -n -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe 'pbcopy'
# replace C-b by C-a instead of using both prefixes
set -gu prefix2
unbind C-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
set -g @plugin 'tmux-plugins/tpm'
set -g @tmux-gruvbox 'dark'
set -g @continuum-restore 'on'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'omerxx/tmux-floax'
set -g @plugin 'wfxr/tmux-fzf-url'
set -g @plugin 'laktak/extrakto'
set -g @fzf-url-bind 'o'
source $HOME/.dotfiles/theme.tmux.conf
# set -g @extrakto_key 'e'
set -g @extrakto_split_size '15'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run $HOME/.dotfiles/tmux-plugin-manager/tpm