-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtmux.conf
171 lines (135 loc) · 6.94 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
set -g default-terminal "screen-256color"
set -g default-shell /bin/zsh
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
set -g history-limit 500000
set-option -sa terminal-overrides '*-256color*:RGB'
set -sg escape-time 0
set -g -q mouse on
set -g base-index 1
set -g pane-base-index 1
setw -g mode-keys vi
# set -g allow-passthrough 1
set -g focus-events on
# notifications
setw -g monitor-activity on
setw -g visual-activity on
# auto rename
set -g automatic-rename on
set -g set-titles on
set -g set-titles-string "#S:#I:#P #W"
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
# default statusbar colors
# set -g status-style fg=colour136,bg=colour235
# Left side of status bar
# set -g status-left-length 32
# set -g status-left '#[bg=colour04,fg=colour00] #S:#I #[default]'
# default window title colors
# set -g window-status-style bg=default,fg=default,dim
# set -g window-status-activity-style fg=default,bold
# set-window-option -g window-status-format '#[fg=colour11]#I#[fg=colour11,dim]:#[default]#W#[fg=colour10]#F'
# active window title colors
# set -g window-status-current-style bg=default,fg=colour166,bright #yellow
# set-window-option -g window-status-current-format '#[fg=colour11,dim]#I#[fg=colour11,dim]:#[fg=colour21]#W#[default]#F'
# pane border
# set -g pane-border-style fg=colour19 #faded black
# set -g pane-active-border-style fg=colour20 #grey
# message text
# set -g message-style bg=colour18,fg=colour16,bold #faded black, orange
# pane number display
# set -g display-panes-active-colour colour04 #blue
# Right side of status bar
# set -g status-right-length 150
# set -g status-right '#[fg=colour04]#(date)'
# set -g status-right '#[fg=colour18][#[fg=colour007,dim]#h#[fg=colour18]][#[fg=colour004]%Y-%m-%d #[fg=colour21]%H:%M#[default]#[fg=colour18]]'
# clock
# setw -g clock-mode-colour colour10 #green
# Control windows
bind-key C-b last-window
set -g renumber-windows on
# reload config
unbind r
bind r source-file ~/.tmux.conf
# Fix cut and paste
bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
unbind-key -T copy-mode-vi Space ; bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind-key -T copy-mode-vi Enter ; bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind-key -T copy-mode-vi C-v ; bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
unbind-key -T copy-mode-vi [ ; bind-key -T copy-mode-vi [ send-keys -X begin-selection
unbind-key -T copy-mode-vi ] ; bind-key -T copy-mode-vi ] send-keys -X copy-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Use arrow keys to resize panes
unbind Down
unbind Right
unbind Left
unbind Up
bind -n M-Right resize-pane -R 8
bind -n M-Left resize-pane -L 8
bind -n M-Up resize-pane -U 4
bind -n M-Down resize-pane -D 4
# Smart pane switching with awareness of vim splits
bind -n M-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n M-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n M-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n M-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n M-\\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
set-option -g status-position bottom
# Dracula Tmux Theme
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, playerctl, kubernetes-context, synchronize-panes
set -g @dracula-plugins "time"
# it can accept `hostname` (full hostname), `session`, `shortname` (short name), `smiley`, `window`, or any character.
set -g @dracula-show-left-icon
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-show-empty-plugins false
set -g @dracula-time-format "%-d/%-m %-I:%M"
set -g @dracula-time-colors "dark_gray pink"
# (Github Dark High Contrast) Colors for Tmux in themes dir
# set -g mode-style "fg=#f0f3f6,bg=#0a0c10"
#
# set -g message-style "fg=#0a0c10,bg=#f0f3f6"
# set -g message-command-style "fg=#0a0c10,bg=#f0f3f6"
#
# set -g pane-border-style "fg=#f0f3f6"
# set -g pane-active-border-style "fg=#71b7ff"
#
# set -g status "on"
# set -g status-justify "left"
#
# set -g status-style "fg=#71b7ff,bg=#f0f3f6"
#
# set -g status-left-length "100"
# set -g status-right-length "100"
#
# set -g status-left-style NONE
# set -g status-right-style NONE
#
# set -g status-left "#[fg=#f0f3f6,bg=#71b7ff,bold] #S #[fg=#71b7ff,bg=#f0f3f6,nobold,nounderscore,noitalics]"
# set -g status-right "#[fg=#f0f3f6,bg=#f0f3f6,nobold,nounderscore,noitalics]#[fg=#f0f3f6,bg=#f0f3f6] #{prefix_highlight} #[fg=#babbbd,bg=#f0f3f6,nobold,nounderscore,noitalics]#[fg=#0a0c10,bg=#babbbd] %Y-%m-%d %I:%M %p #[fg=#0366d6,bg=#babbbd,nobold,nounderscore,noitalics]#[fg=#f0f3f6,bg=#0366d6,bold] #h "
#
# setw -g window-status-activity-style "underscore,fg=#9ea7b3,bg=#f0f3f6"
# setw -g window-status-separator ""
# setw -g window-status-style "NONE,fg=#ffffff,bg=#f0f3f6"
# setw -g window-status-format "#[fg=#f0f3f6,bg=#f0f3f6,nobold,nounderscore,noitalics]#[fg=#454a51,bg=#f0f3f6,nobold,nounderscore,noitalics] #I #W #F #[fg=#f0f3f6,bg=#f0f3f6,nobold,nounderscore,noitalics]"
# setw -g window-status-current-format "#[fg=#f0f3f6,bg=#26cd4d,nobold,nounderscore,noitalics]#[fg=#0a0c10,bg=#26cd4d,bold] #I #W #F #[fg=#26cd4d,bg=#f0f3f6,nobold,nounderscore,noitalics]"
#
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'jabirali/tmux-tilish'
# set -g @plugin 'Morantron/tmux-fingers'
set -g @plugin 'trevarj/tmux-open-nvim'
set -g @plugin 'dracula/tmux'
# Overrides matching file paths with :[line]:[col] at the end
set -g @fingers-pattern-0 "(([.\\w\\-~\\$@]+)(\\/?[\\w\\-@]+)+\\/?)\\.([\\w]+)(:\\d*:\\d*)?"
# Launches helper script on Ctrl+[key] in fingers mode
set -g @fingers-ctrl-action "xargs -I {} tmux run-shell 'cd #{pane_current_path}; ~/.tmux/plugins/tmux-open-nvim/scripts/ton {} > ~/.tmux/plugins/tmux-open-nvim/ton.log'"s
set -g @tilish-navigator 'on'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'