-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
102 lines (75 loc) · 3.23 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
# Adapted from: https://www.josean.com/posts/tmux-setup
# Configure true colors
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
unbind r
bind r source-file ~/.tmux.conf \; display "Config reloaded."
set -g prefix C-b
set -g mouse on
# Splitting windows
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
# Switching pane focus
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Resizing page size
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
bind -r m resize-pane -Z # maximizing/minimizing a pane
# Start windows and panes 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
# Vim-like movements for tmux's copy mode
bind-key v copy-mode \; display "Copy mode." # start copy mode with Prefix + v
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection \; display "Begin copying." # start selecting text with "v"
bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
# Sync clipboard with system
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -selection clipboard" \; display "Copied."
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -selection clipboard" \; display "Copied."
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode after dragging with mouse
bind-key p paste-buffer # leader + p for pasting
set-option -g status-position top
# Remove delay for exiting insert mode with ESC in Neovim
set -sg escape-time 10
set -g history-limit 50000
set -g display-time 1500
# tpm plugin
set -g @plugin 'tmux-plugins/tpm'
# List of plugins
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
# Theme (catppuccin)
set -g @plugin 'catppuccin/tmux#latest' # See https://github.com/catppuccin/tmux/tags for additional tags
set -g @catppuccin_window_status_style "rounded"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_connect_separator "yes"
set -g @catppuccin_directory_text "#{pane_current_path}"
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_directory}"
set -ag status-right "#{E:@catppuccin_status_user}"
set -ag status-right "#{E:@catppuccin_status_host}"
set -ag status-right "#{E:@catppuccin_status_session}" # tmux session
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'