-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy path.tmux.conf
More file actions
145 lines (116 loc) · 4.98 KB
/
Copy path.tmux.conf
File metadata and controls
145 lines (116 loc) · 4.98 KB
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
# remap prefix from 'C-b' to 'C-Space'
unbind C-b
set -g prefix C-Space
# Start index of window/pane with 1, because we're humans, not computers
set -g base-index 1
setw -g pane-base-index 1
# Update files on focus (using for vim)
set -g focus-events on
# https://rsapkf.xyz/blog/enabling-italics-vim-tmux
set -g default-terminal "tmux"
# tell Tmux that outside terminal supports true color
set -ga terminal-overrides "xterm-256color"
# bind-key -r f run-shell "tmux neww ~/bin/tmux-sessionizer"
# split panes using | and -
bind-key - split-window -v -c '#{pane_current_path}'
bind-key \\ split-window -h -c '#{pane_current_path}'
bind = select-layout even-horizontal
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1
bind-key e send-keys "tmux capture-pane -p -S - | nvim -c 'set buftype=nofile' +" Enter
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# reload config file (change file location to your the tmux.conf you want to use)
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# bind-key M split-window -h "vim ~/.tmux.conf"
bind -n C-M-Left resize-pane -L 2
bind -n C-M-Right resize-pane -R 2
bind -n C-M-Down resize-pane -D 1
bind -n C-M-Up resize-pane -U 1
# bind-key M-k resize-pane -y 1 \; select-pane -U \; resize-pane -y 999
# bind-key M-j resize-pane -y 1 \; select-pane -D \; resize-pane -y 999
# bind-key M-h select-pane -L
# bind-key M-l select-pane -R
# Use vim keybindings in copy mode
set -g set-clipboard off
setw -g mode-keys vi
unbind [
bind Escape copy-mode
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "pbcopy"
unbind -T copy-mode-vi Space
bind -T copy-mode-vi Space send -X jump-again
bind-key -T copy-mode-vi 0 send -X back-to-indentation
bind y run 'tmux save-buffer - | pbcopy '
bind C-y run 'tmux save-buffer - | pbcopy '
# setw -g aggressive-resize on
# Undercurl - what is this?
# set -g default-terminal "${TERM}"
# set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
# set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'casonadams/tmux-vi-navigation'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'wfxr/tmux-fzf-url' # prefix + u
# set -g @plugin 'dracula/tmux'
# set -g @plugin 'odedlaz/tmux-onedark-theme'
# set -g @plugin 'robhurring/tmux-spotify'
# https://github.com/catppuccin/tmux
# set -g @plugin 'catppuccin/tmux'
# PR to add user defined section https://github.com/catppuccin/tmux/pull/47
# set -g @plugin 'nenkoru/catppuccin_tmux'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'fcsonline/tmux-thumbs'
# prefix + I (install)
# prefix + U (update)
# prefix + alt + u (uninstall)
# prefix + r (refresh)
run-shell ~/.tmux/theme.sh # sets @catppuccin_flavour based on dark-mode
# set -g @catppuccin_window_left_separator ""
# set -g @catppuccin_window_right_separator " "
# set -g @catppuccin_window_middle_separator " █"
# set -g @catppuccin_window_number_position "right"
# 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_right_separator_inverse "no"
# set -g @catppuccin_status_fill "icon"
# set -g @catppuccin_status_connect_separator "no"
#
set -g @catppuccin_window_status_enable "yes"
set -g @catppuccin_window_status_icon_enable "yes"
set -g @catppuccin_window_left_separator "█"
set -g @catppuccin_window_right_separator "█ "
set -g @catppuccin_window_number_position "left"
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"
# application directory session user host date_time battery
set -g @catppuccin_status_modules "session date_time"
set -g @catppuccin_date_time_text "%Y-%m-%d"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_right_separator_inverse "yes"
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_connect_separator "no"
# set -g @catppuccin_window_format_directory_text "#{b:pane_current_path}"
# tmux-thumbs
# https://github.com/fcsonline/tmux-thumbs
run-shell ~/.tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
# set -g @thumbs-key t
# bind-key -r \; thumbs-pick
set -g @thumbs-command 'echo -n {} | pbcopy'
# set -g visual-activity off
# set -g visual-bell off
# set -g visual-silence on
set -g status-position bottom # top OR bottom
# set -g status-interval 30
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'