-
Notifications
You must be signed in to change notification settings - Fork 3
/
.tmux.conf
165 lines (128 loc) · 5.11 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
#run-shell "powerline-daemon -q"
#unbind-key -n C-Left
#unbind-key -n C-Right
#set-window-option -g xterm-keys on
# color scheme (styled as vim-powerline)
#set -g status-left-length 200
#set -g status-right-length 451
set -g status-fg white
set -g status-bg colour234
#set -g pane-border-fg colour245
#set -g pane-active-border-fg colour39
#set -g message-fg colour16
#set -g message-bg colour221
#set -g message-attr bold
#set -g status-interval 2
#set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
#set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I #W "
#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #{?window_zoomed_flag,#[fg=colour226],} #I: #W #[fg=colour39,bg=colour234,nobold]⮀"
#set-option -g status-utf8 on
#set-option -g status-justify "centre"
#set-option -g status-left "#(/home/lozi/.apps/tmux-powerline/powerline.sh left)"
#set-option -g status-right "#(/home/lozi/.apps/tmux-powerline/powerline.sh right)"
#Set Ctrl+a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
#Slip-windows
unbind %
bind s split-window -c '#{pane_current_path}' -h
unbind '"'
bind v split-window -c '#{pane_current_path}' -v
# start window numbers at 1 to match keyboard order with tmux window other
set -g base-index 1
set-window-option -g pane-base-index 1
#set tmux vi mode
setw -g mode-keys vi
#bind-key -t vi-copy 'v' begin-selection
#bind -t vi-copy y copy-pipe "xclip -sel clip -i"
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# move x clipboard into tmux paste buffer
#bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
#bind C-y run "tmux save-buffer - | xclip -i"
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# increase scrollback lines
set -g history-limit 100000
setw -g alternate-screen on
#Bind copy to OS
#True color
# MacOS
#set-option -ga terminal-overrides ",xterm-256color:Tc"
# Ubuntu
set-option -sa terminal-overrides ",alacritty:RGB"
# Powerline
#source /Users/triet/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf
#source "/usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
#source "/usr/local/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf"
#set-option -g default-terminal "screen-256color"
#source /home/lozi/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
# Cursor shape for Neovim
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
#set-option -g default-terminal "screen-256color"
#set-option -ga terminal-overrides "screen-256color"
# decrease command delay (increases vim responsiveness)
set -sg escape-time 1
#Mouse on
set-option -g mouse on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'nhdaly/tmux-scroll-copy-mode'
set -g @plugin 'seebi/tmux-colors-solarized'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# for neovim
#set -g @resurrect-strategy-nvim 'session'
#set -g @plugin 'jimeh/tmux-themepack'
set -g @scroll-down-exit-copy-mode "on"
set -g @colors-solarized 'dark'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'yardnsm/tmux-1password'
#set -g @plugin 'dracula/tmux'
#set -g @plugin 'wfxr/tmux-power'
set -g @plugin "arcticicestudio/nord-tmux"
#set -g @plugin 'o0th/tmux-nova'
#
#set -g @nova-nerdfonts true
#set -g @nova-segment-mode "#{?client_prefix,Ω,ᐅ}"
#set -g @nova-segment-mode-colors "#50fa7b #282a36"
#
#set -g @nova-segment-whoami "#(whoami)@#h"
#set -g @nova-segment-whoami-colors "#50fa7b #282a36"
#
#set -g @nova-pane "#I#{?pane_in_mode, #{pane_mode},} #W"
#set -g @nova-rows 0
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# fs [FUZZY PATTERN] - Select selected tmux session
# - Bypass fuzzy finder if there's only one match (--select-1)
# - Exit if there's no match (--exit-0)
# Auto restore session
#set -g @continuum-restore 'on'
# Start tmux when computer start
#set -g @continuum-boot 'on'
#set -g @continuum-boot-options 'iterm'
# restore neovim session for neovim
#set -g @resurrect-strategy-nvim 'session'
# fzf-locate
bind-key -n 'M-`' run "tmux split-window -p 40 'tmux send-keys -t #{pane_id} \"$(locate / | fzf -m | paste -sd\\ -)\"'"
# Index starts from 1
set-option -g base-index 1
# select-pane (@george-b)
bind-key 0 run "tmux split-window -p 40 'bash -ci ftpane'"
#set -g default-shell $SHELL
#set -g default-command "reattach-to-user-namespace -l ${SHELL}"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
set -g default-terminal 'tmux-256color'
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'