-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.tmux.conf
132 lines (105 loc) · 3.66 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
# True color settings
set -g default-terminal "$TERM"
set -ag terminal-overrides ",$TERM:Tc"
set-window-option -g xterm-keys on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
set-option -gw xterm-keys on
set -gq allow-passthrough on
# Changing prefix to C-a
set -g prefix C-a
unbind C-b
unbind M-s
bind-key C-a send-prefix
# Refresh tmux
unbind r
bind r source-file ~/.tmux.conf \; display "Config Reloaded"
# Mouse
set -g mouse off
# Start windows and panes at 1, not 0
set -g base-index 1
# =========================================================================================
# Panes
setw -g pane-base-index 1
# Rebinding split Keys
unbind %
bind-key -n M-\\ split-window -h -c "#{pane_current_path}"
unbind '"'
bind-key -n M-- split-window -v -c "#{pane_current_path}"
unbind p
bind p split-window -v -c "#{pane_current_path}"
# For resizing
bind -n C-M-j resize-pane -D 3
bind -n C-M-k resize-pane -U 3
bind -n C-M-l resize-pane -R 3
bind -n C-M-h resize-pane -L 3
# toggle fullscreen
bind -n M-m resize-pane -Z
# Setting up vim Keys for navigating panes
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
# Switch panes
bind -n M-K swap-pane -U
bind -n M-J swap-pane -D
# =========================================================================================
# Layouts
bind -n M-v select-layout main-vertical
bind -n M-z select-layout main-horizontal
bind -n M-V select-layout even-vertical
bind -n M-Z select-layout even-horizontal
# =========================================================================================
# Windows
# Navigating through opened windows
bind -n M-p previous-window
bind -n M-n next-window
# Shifting window positions
bind -n M-H swap-window -t +1
bind -n M-L swap-window -t -1
# New window
unbind c
unbind n
# bind c new-window -c "#{pane_current_path}"
bind n new-window -c "#{pane_current_path}"
# Mapping window navigation
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 0
bind-key -n M-s set-option -g status
bind-key -n M-y copy-mode
# =========================================================================================
# Bar Settings
set-option -g status-position top
# set-option -g status-interval 1
set-option -g status-justify left
set -g status-left-length 85
set -g status-style 'bg=#1d1d1d,fg=#fff4d2'
set-option -g status-right '#[bg=#d8a657 , fg=#000000,bold] #S '
set-option -g status-left ''
set -g window-status-format "#[fg=#ebdbb2,bg=#303030,bold] #I #[fg=#ebdbb2,bg=#404040,bold] #W "
set -g window-status-current-format "#[fg=#000000,bg=#d8a657,bold] #I #[fg=#000000,bg=#83a598 ,bold] #W "
set -g message-style bg=#d8a657,fg=#1d1d1d,bold
set -g message-command-style bg=#1d1d1d,fg=#d8a657,bold
set -g pane-active-border-style fg=#8ec07c
set -g pane-border-style fg=#555555
# =========================================================================================
# Plugin manager
set -g @plugin 'tmux-plugins/tpm'
# tmux plugins
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux session after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions after every 15 mins
# plugins settings
set -g @resurrect-capture-pane-contents 'on'
# set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'
set -g @resurrect-strategy-nvim 'session'
# initializing the plugin manager
run '~/.tmux/plugins/tpm/tpm' # Neeg to be kept in the very bottom