-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
162 lines (119 loc) · 4.52 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
# True color
set -g default-terminal "tmux-256color"
set-option -sa terminal-overrides ",tmux-256color:RGB"
set-option -a terminal-features "alacritty:RGB"
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
set -g mouse on
unbind C-b
set -g prefix C-Space
# Disable escape timeout
set -sg escape-time 0
# Popup selector for tmux sessions
bind C-j display-popup -E "\
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
sed '/^$/d' |\
fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\
xargs tmux switch-client -t"
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
unbind v
unbind h
unbind % # Split vertically
unbind '"' # Split horizontally
unbind p
unbind P
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
# Resize panes
bind -n M-C-h resize-pane -L 5
bind -n M-C-j resize-pane -D 5
bind -n M-C-k resize-pane -U 5
bind -n M-C-l resize-pane -R 5
unbind n #DEFAULT KEY: Move to next window
unbind w #DEFAULT KEY: change current window interactively
bind n command-prompt "rename-window '%%'"
bind w new-window -c "#{pane_current_path}"
bind -n M-h previous-window
bind -n M-l next-window
set-window-option -g mode-keys vi
unbind -T copy-mode-vi Space; #Default for begin-selection
unbind -T copy-mode-vi Enter; #Default for copy-selection
bind -T copy-mode-vi v send-keys -X begin-selection
# bind -T vi-copy y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" \; display-message "copied to system clipboard"
set-option -g status-bg default
set-option -g status-fg colour255
unbind [
# Bind 'Space' to enter copy-mode
bind-key Space copy-mode
# Bind 'Escape' to leave copy-mode
bind-key -T copy-mode-vi Escape send-keys -X cancel
# DESIGN TWEAKS
# don't do anything when a 'bell' rings
set -g visual-activity off
set -g visual-bell on
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
# Statusbar
set -g status-style "bg=default"
set -g status-position bottom
set -g status-justify left
set -g status-right ""
set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}\[#[fg=#ffffff]#{=4:pane_title}] "
set -g status-right-length 50
set -g status-left-length 85
set-window-option -g window-status-format ' #{window_name} '
set-window-option -g window-status-current-format ' #{window_name} '
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
setw -g window-status-format "#{pane_current_path}"
setw -g window-status-style 'fg=#ffffff bg=default'
setw -g window-status-format ' #I #[fg=#ffffff]#W #[fg=#ffffff]#F '
setw -g window-status-current-style 'fg=#000000 bg=#ffffff'
setw -g window-status-current-format ' #W #F '
setw -g window-status-bell-style 'fg=colour2 bg=default bold'
# Messages
set -g message-style 'fg=#ffffff bg=default bold'
# border colours
set -g pane-border-style "bg=default fg=#ffffff"
set -g pane-active-border-style "bg=default fg=#ffffff"
# Enchancing tmux with plugins
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Install by: prefix key -> I
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'laktak/extrakto'
set -g @plugin '2kabhishek/tmux2k'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @plugin 'fcsonline/tmux-thumbs'
# use a theme
set -g @tmux2k-theme 'duo'
# to show icons only
# set -g @tmux2k-icons-only true
set -g @tmux2k-duo-fg "#ffffff" # this will get you duo blue shown above
set -g @tmux2k-duo-bg "#0f0f0f" # this will set the bg for duo theme
set -g @tmux2k-right-sep # alternate right status bar sep
set -g @tmux2k-win-right-sep # alternate window right sep
set -g @tmux2k-show-powerline false
# set start icon, accpets: `session`, 'window`, or any string
set -g @tmux2k-start-icon "⋏"
set -g @tmux2k-left-plugins "git cpu ram"
set -g @tmux2k-right-plugins "network time"
# change refresh rate
set -g @tmux2k-refresh-rate 5
set -g @yank_action 'copy-pipe'
# set -g @continuum-restore 'on'
set -g @tzs-key-launch 'C-j'
run -b '~/.tmux/plugins/tpm/tpm'