-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
154 lines (122 loc) · 4.5 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
### vim style tmux config
set-option -g default-shell $SHELL
unbind C-b
# use C-space as prefix (outer tmux),
# M-space is also configured to act like C-space in alacritty config:
# - { key: Space, mods: Alt, chars: "\x00" }
set-option -g prefix C-Space
# user C-a as inner tmux prefix,
bind-key -n C-a send-prefix
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
set -g pane-base-index 1
# history
set -g history-limit 12288
# easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# vim is good
setw -g mode-keys vi
# use vim-like keys for splits and windows
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# mouse behavior
setw -g mouse on
unbind -n MouseDown3Pane
# layout config
bind-key enter next-layout
bind-key space rotate-window
bind-key + select-layout main-horizontal
bind-key = select-layout main-vertical
# window config
set-window-option -g other-pane-height 25
set-window-option -g other-pane-width 80
set-window-option -g display-panes-time 1500
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Fix catppuccin window discoloration after window status activity
setw -g window-status-activity-style none
# Set window notifications
setw -g monitor-activity on
set -g visual-activity off
# Allow the arrow key to be used immediately after changing windows
set-option -g repeat-time 0
# resize the pane
bind-key -r J resize-pane -D 3
bind-key -r K resize-pane -U 3
bind-key -r H resize-pane -L 3
bind-key -r L resize-pane -R 3
# some key-binds
bind x kill-pane
bind-key : command-prompt
bind-key r refresh-client
bind-key L clear-history
bind-key a last-pane
bind-key q display-panes
bind-key c new-window
bind-key [ copy-mode
bind-key ] paste-buffer
### Styling
# Set the default terminal terminfo
set -g default-terminal "tmux-256color"
# True colour support
set -as terminal-overrides ",xterm*:Tc"
### Load TPM - Tmux Plugin Manager
# To install TPM:
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# To install newly added plugins:
# prefix + I (capital i)
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
# List of plugins
# default
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# tmux-continuum
set -g @plugin 'tmux-plugins/tmux-resurrect'
# catppuccin
# NOTE: To switch between catppuccin and dracula, you must delete the plugin contents because of a name collision.
# rm -rf $HOME/.tmux/plugins/tmux
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavor 'mocha' # latte,frappe, macchiato or mocha
set -g @catppuccin_window_status "no"
set -g @catppuccin_window_current_text "#{b:pane_current_path}"
set -g @catppuccin_window_left_separator "█"
set -g @catppuccin_window_middle_separator "█ "
set -g @catppuccin_window_right_separator ""
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_status_modules_left "session"
set -g @catppuccin_status_modules_right "null"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_left_separator "█"
set -g @catppuccin_status_right_separator "█"
set -g @catppuccin_session_icon "null"
# dracula
# NOTE: To switch between catppuccin and dracula, you must delete the plugin contents because of a name collision.
# rm -rf $HOME/.tmux/plugins/tmux
# set -g @plugin 'dracula/tmux'
# set -g @dracula-show-powerline true
# set -g @dracula-show-left-icon ' '
# set -g @dracula-plugins " "
# set -g @dracula-show-timezone false
# set -g @dracula-military-time true
# set -g @dracula-show-fahrenheit false
# set -g @dracula-show-flags true
# tmux-yank
set -g @plugin 'tmux-plugins/tmux-yank'
################################################################################
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'