-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
132 lines (102 loc) · 4.24 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
# Prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Settings
# Use Vi mode
setw -g mode-keys vi
# Increase scrollback buffer size
set-option -g history-limit 5000
# Start window and pane numbering from 1
set-option -g base-index 1
set-option -g pane-base-index 1
# Automatic renaming of windows
set-window-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Renumber windows when one is removed.
set-option -g renumber-windows on
# Setting the correct term
set-option -g default-terminal "screen-256color"
# Enable undercurl
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# Enable undercurl colors
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# Allow the mouse to resize windows and select tabs
set -g mouse on
# Allow tmux to set the terminal title
set -g set-titles on
# Monitor window activity to display in the status bar
setw -g monitor-activity on
# Refresh status more often
set-option -g status-interval 1
# Vi key bindings in tmux command prompt
set-option -g status-keys vi
# Faster vim mode switching
set-option -s escape-time 0
# Focus events enabled for terminals that support them
set -g focus-events on
# Support RGB color
# set-option -ga terminal-overrides "*:Tc"
set -as terminal-features ",*:RGB"
set -ag terminal-overrides ",xterm-256color:RGB"
# Status line customisation
set-option -g status-left-length 100
set-option -g status-right-length 100
set-option -g status-left " [#{session_name}] "
set-option -g status-style "fg=#7C7D83 bg=default"
set-option -g window-status-current-style "fg=#5eacd3"
set-option -g window-status-format "#{window_index}:#{window_name}#{window_flags} " # window_name -> pane_current_command
# set-option -g window-status-current-format "#{window_index}:#{window_name}#{window_flags} "
set-window-option -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
set-option -g window-status-activity-style none
#----
# set-option -g status-position bottom
# set-option -g status-bg colour234
# set-option -g status-fg colour137
# set-option -g status-left '[#S]'
# set-option -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
# set-option -g status-right-length 50
# set-option -g status-left-length 20
# set-window-option -g window-status-current-style "bg=colour238,fg=colour81,bold"
# set-window-option -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
# set-window-option -g window-status-style "bg=colour235,fg=colour138,none"
# set-window-option -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
# Key bindings
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind v split-window -h -c "#{pane_current_path}" \; select-pane -t 0
bind s split-window -v -c "#{pane_current_path}" \; select-pane -t 0
bind C-p previous-window
bind C-n next-window
# Swap pane
bind H swap-pane -s '{left-of}'
bind J swap-pane -s '{down-of}'
bind K swap-pane -s '{up-of}'
bind L swap-pane -s '{right-of}'
# Resize pane
bind -r C-h resize-pane -L 5
bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5
bind -r C-l resize-pane -R 5
# open lazygit in a new window with prefix+g
bind-key g new-window -n lazygit -c "#{pane_current_path}" "lazygit"
# open .dotfiles folder
bind -r D neww -c "#{pane_current_path}" "nvim ~/.dotfiles"
bind -r f run-shell "tmux neww ~/.dotfiles/bin/tmux-sessionizer"
bind -r i run-shell "tmux neww ~/.dotfiles/bin/tmux-cht"
# prefix + I install plugin
# prefix + u update plugin
# prefix + alt + u uninstall plugin
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
run '~/.tmux/plugins/tpm/tpm'