forked from bibjaw99/workstation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
129 lines (103 loc) · 3.45 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
# Basic Settings
# fixing tmux coloors
# set -g default-terminal "xterm-256color"
# set-option -a terminal-overrides ",alacritty:RGB"
# set-option -a terminal-overrides ",kitty:RGB"
set-option -g terminal-features ',xterm-256color:RGB'
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
bind-key C-a send-prefix
# Refresh tmux
unbind r
bind r source-file ~/.tmux.conf \; display "Config Reloaded"
# Enable Mouse
set -g mouse on
# 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
unbind '"'
bind-key -n M-- split-window -v
unbind p
bind p split-window -v -c "#{pane_current_path}"
# For resizing
bind -r j resize-pane -D 3
bind -r k resize-pane -U 3
bind -r l resize-pane -R 3
bind -r h resize-pane -L 3
# toggle fullscreen
bind -r 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-J swap-pane -D
bind -n M-K swap-pane -U
# =========================================================================================
# 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
# 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
# =========================================================================================
# Bar Settings
set-option -g status-position top
set-option -g status-interval 1
set -g status-left-length 85
set -g status-left-length 60
set-option -g status-left '#[fg=#83a598]#(echo "Session Name: ")#[fg=#d8a657]#{session_name}'
set-option -g status-right '%d %b, %Y || %H:%M:%S'
set-option -g status-justify centre
set -g status-style 'bg=default,fg=#fff4d2'
set -g window-status-current-style 'fg=#8ec07c'
set -g window-status-format "#I:#W"
set -g window-status-current-format "#I:#W"
# =========================================================================================
# 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