-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
164 lines (129 loc) · 5.06 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
##############
## plugins #
##############
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'a-rodin/tmux-session-spectrum'
set -g @plugin 'roosta/tmux-fuzzback'
set -g @plugin 'tmux-plugins/tmux-yank'
#############################
# default terminal option #
#############################
# set-option -sa terminal-overrides ',xterm-256color:RGB'
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# focus events enabled for terminals that support them
if-shell '[[ $(uname -s) = Darwin ]]' {
set-option -g default-shell /bin/zsh
} {
set-option -g default-shell /usr/bin/zsh
}
set -g focus-events on
set-option -g history-limit 5000
set -sg escape-time 0
# Activity monitoring
set-window-option -g monitor-activity off
set-option -g visual-activity off
#############################
# default pane as 1 not 0 #
#############################
set -g base-index 1
set -g pane-base-index 1
##############
# keybinds #
##############
#default prefix
unbind C-b
#alt as a modificator
set -qg prefix M-z
#Split in the same dir
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind-key -n "M-Right" resize-pane -R
bind-key -n "M-Left" resize-pane -L
bind-key -n "M-Up" resize-pane -U
bind-key -n "M-Down" resize-pane -D
#widnow swapping
bind-key -r Left swap-window -t -1
bind-key -r Right swap-window -t +1
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# pane movement
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key u last-window \; join-pane -s !
bind-key e command-prompt -p "PS1 name: " "send-keys \"export\ PS1='(%1)'\\\$\\\{PS1\\\}\" Enter"
MAIN_COLOR=colour14
set -g @resurrect-processes 'false'
# set vi mode for copy mode
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer -p
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
# bind-key -t vi-copy 'y' copy-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind-key -T copy-mode-vi '$' 'send-keys -X end-of-line; send-keys -X cursor-left'
bind-key -T copy-mode-vi 'a' command-prompt -p "# TAG: " "send-keys -X copy-pipe-and-cancel 'tnote \"%1\"'"
bind V capture-pane -S - \; save-buffer ~/.tmux-tmp \; delete-buffer \; send-keys Escape 'nvim -c "set buftype=nofile" +"silent \!rm ~/.tmux-tmp" ~/.tmux-tmp +' Enter
## reload config file
bind v source-file ~/.tmux.conf \; display "Config Reloaded!"
bind r respawn-pane -k \; display "Pane Respawned"
##ftwind
bind-key 0 run -b 'bash -ci ftwind'
bind-key f run "tmux split-window -l 12 'bash -ci ftpane'"
##fuzback
set -g @fuzzback-bind g
#####################
# Mouse scrolling #
#####################
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M; send-keys -M; send-keys -M; send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' 'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'"
bind -n WheelDownPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M; send-keys -M; send-keys -M; send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' 'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'"
########################################
# # don't rename windows automatically#
########################################
set-option -g allow-rename off
######################
### DESIGN CHANGES ###
######################
# default statusbar colors
set-option -g status-style bg=$MAIN_COLOR,fg=colour7,default
setw -g window-status-current-style fg=colour0,bg=colour7
setw -g window-status-current-format ' #[fg=colour1]#I#[fg=colour0]:#W #F '
setw -g window-status-style fg=colour15,bg=default,none
setw -g window-status-format ' #[fg=colour7]#I#[fg=colour7]:#W#F '
# pane border
set-option -g pane-border-style fg=colour8
set-option -g pane-active-border-style fg=$MAIN_COLOR
# pane number display
set-option -g display-panes-active-colour $MAIN_COLOR
set-option -g display-panes-colour colour8
# message text
set-option -g message-style bg=colour9,fg=colour0
# clock
set-window-option -g clock-mode-colour $MAIN_COLOR
# bell
set-window-option -g window-status-bell-style fg=colour7,bg=colour1
#set inactive/active window styles
set -g window-style 'fg=default,bg=colour8'
set -g window-active-style 'fg=default,bg=colour0'
#
## set the pane border colors
set -g pane-border-style fg=colour7,bg=colour8
set -g pane-active-border-style fg=$MAIN_COLOR,bg=colour0
set -g status-right "| %a %h-%d %H:%M "
set -g status-right-length 250
set -g @continuum-restore 'on'
set -g @continuum-save-interval '0'
##################
# init options #
##################
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'