-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot_tmux.conf
114 lines (84 loc) · 3.01 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
# unbind C-b
# set -g prefix C-a
# bind C-a send-prefix
# Enable mouse support
set -g mouse on
# Keep ENV variables
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# Use 256 colours
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",screen-256color:Tc"
# Start window count at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Allows for faster key repetition
set -s escape-time 0
# Use | - for splitting windows
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind -n F1 previous-window
bind -n F2 next-window
bind -n F3 new-window -d
bind -n F4 confirm-before -p "Kill me?" kill-window
# Pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resizing
bind H resize-pane -L 3
bind J resize-pane -D 3
bind K resize-pane -U 3
bind L resize-pane -R 3
bind : command-prompt
# C+a m - Open a manpage in a new split-window
bind m command-prompt "split-window 'exec man %%'"
bind / command-prompt "split-window 'exec man %%'"
# C+a v - Open vim in a new split-window
bind v command-prompt "split-window 'exec vim %%'"
# C+a S - SSH to a host in a new window
bind S command-prompt "new-window -n %1 'ssh %1'"
# C+a A - Toggle window synchronisation
bind A setw synchronize-panes
# C+a z - Maximise/Unmaximise pane
bind z resize-pane -Z
# C+a R - Reload tmux configuration
bind R source-file ~/.tmux.conf
# C+a r - Rename current window
bind r command-prompt "rename-window %%"
# Nice titles
set -g set-titles on
set -g set-titles-string "tmux: #W"
set -g status-interval 1
set -g history-limit 10000
setw -g mode-keys vi
set -g status-keys vi
# Set window notifications
setw -g monitor-activity on
# Allow the arrow key to be used immediately after changing windows
set-option -g repeat-time 0
# Connect tmux buffers with the pasteboard.
bind-key y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
set -g @catppuccin_window_status_enable "yes"
set -g @catppuccin_window_status_icon_enable "yes"
set -g @catppuccin_window_default_text "#{b:pane_current_path} (#W)"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'arcticicestudio/nord-tmux'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'sainnhe/tmux-fzf'
# set -g @continuum-restore 'on'
set -g @catppuccin_flavour 'mocha'
# Initialize TMUX plugin manager (keep this line at the bottom of tmux.conf)
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# prefix + I to intall plugins and prefix + U to update them
run '~/.tmux/plugins/tpm/tpm'
# Re-map ctrl-l to clear screen (keep this line at the very bottom of tmux.conf)
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "send-keys C-l"