-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
111 lines (91 loc) · 2.96 KB
/
Copy path.tmux.conf
File metadata and controls
111 lines (91 loc) · 2.96 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
# TODO: Fix this if possible..
# if you comment the Tc option then Vim renders properly but not Neovim (in Tmux)
# if you uncomment the Tc option then Neovim render properly but not Vim (in Tmux)
# NOTE: As of now, I've decided to only use 256 colors in Vim.
set -g @colorize_enable off
if -F '#{m:*/dev/pts*,#{TTY}}' {
set -g @colorize_enable on
} {
}
if -F '#{m:*/dev/ttys*,#{TTY}}' {
set -g @colorize_enable on
} {
}
if -F '#{@colorize_enable}' {
set -g @colorize_enable on
set -g default-terminal "xterm-256color"
set-option -sa terminal-overrides ",xterm*:Tc"
# display 'pseudo-terminal or macos ttys'
} {
# display 'tty'
}
set-option -g status-position top
set -g focus-events on
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
# note see if it conflicts with vim increment command
# note what about using alt ?
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
unbind %
bind v split-window -h
unbind '"'
bind h split-window -v
unbind r
bind r source-file ~/.tmux.conf
# start numbering at 1
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
# prefix-x to kill a pane
# prefix-c to create a new window
# prefix-n to switch to next window
# prefix-number to switch to a window using an index
# prefix-w to show all windows
# resize panes
bind -r Left resize-pane -L 5
bind -r Right resize-pane -R 5
bind -r Up resize-pane -U 5
bind -r Down resize-pane -D 5
# maximize pane
bind -r m resize-pane -Z
set -g mouse on
# prefix-b to enter copy mode or Ctl-c to exit copy mode
bind 'b' copy-mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'C-v' send-keys -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
unbind -T copy-mode-vi MouseDragEnd1Pane
# set plugins
# Install plugins using prefix-I
# Update all plugins using prefix-U all
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
if -F '#{@colorize_enable}' {
# set -g @plugin 'jsec/tmux-night-owl'
set -g @plugin 'rose-pine/tmux'
set -g @rose_pine_variant 'moon'
set -g @rose_pine_only_windows 'on'
set -g @rose_pine_disable_active_window_menu 'on'
set -g @rose_pine_field_separator ' | ' # NOTE: Not working
set -g @rose_pine_window_separator '.'
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name' # NOTE: Requires yq (brew install --formula yq)
} {
}
# plugin keymaps
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
# auto clean or install plugins
# update plugins keep manual (prefix + U)
# TODO: verify install plugins if we should pass a param
run '~/.tmux/plugins/tpm/bin/clean_plugins'
run '~/.tmux/plugins/tpm/bin/install_plugins'
# init plugin manager
run '~/.tmux/plugins/tpm/tpm'