This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
88 lines (74 loc) · 2.98 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
set -g prefix C-b
## also use Alt-j as the prefix key
set -g prefix2 M-j
#set the display-panes timeout to 1.3 seconds
set -g display-panes-time 1300
# flashy bell!
set-option -g visual-bell on
##### mouse mode on!
set -g mouse on
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear # copy to system clipboard but don't clear the selection
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-no-clear
bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe-no-clear
## search easily with / and f
bind-key / copy-mode \; send-key ?
bind-key f copy-mode \; send-key ?
## move around panes with vim keybindings
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind o select-pane -t :.+
bind O select-pane -t :.-
# move window left/right
bind w 'swap-window -t -; select-window -t -'
bind e 'swap-window -t +; select-window -t +'
# start new windows/panes in the current directory because it's easy to cd to home
bind c new-window -c '#{pane_current_path}'
bind '"' split-window -v
bind '%' split-window -h
bind '_' split-window -c '#{pane_current_path}' -v
bind '|' split-window -c '#{pane_current_path}' -h
## jump to last session
bind t switch-client -l
## jump to last window
bind y last-window
## jump to last pane
bind u last-pane
# reload config file by pressing r
# reload theme file by pressing T
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
bind T source-file ~/.tmux/theme \; display "Theme file Reloaded!"
# press \ to toggle pane synchronization
bind '\' setw synchronize-panes
# bind < and > to resize panes left and right
bind-key < resize-pane -L 3
bind-key > resize-pane -R 3
set-option -g base-index 1
set-option -ga update-environment KRB5CCNAME
set-option -ga update-environment SSH_AGENT_PID
set-option -ga update-environment SSH_AUTH_SOCK
set-option -sg escape-time 0
## various window options
set-option -g renumber-windows on
set-option -g set-titles on
set-window-option -g allow-rename on
set-window-option -g alternate-screen on
set-window-option -g automatic-rename on
set -g default-terminal "screen-256color"
set -g terminal-overrides "screen*:colors=256"
set -g focus-events on
# these settings for underlined URL support
set -ga terminal-features "*:hyperlinks"
set -ga terminal-features "screen-256color:RGB"
set -ga terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -ga terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @fpp-mode 'edit'
set -g @plugin 'tmux-plugins/tmux-fpp'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'wfxr/tmux-fzf-url'
set -g @plugin "nordtheme/tmux"
run '~/.config/tmux/plugins/tpm/tpm' # initialize TMUX plugin manager