-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
101 lines (81 loc) · 3.76 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
set -g prefix C-Space
unbind-key C-b
bind-key C-Space send-prefix
# resize windows
bind-key -r -T prefix C-Up resize-pane -U
bind-key -r -T prefix C-Down resize-pane -D
bind-key -r -T prefix C-Left resize-pane -L
bind-key -r -T prefix C-Right resize-pane -R
# helps in faster key repetition
set -sg escape-time 0
# start session number from 1 rather than 0
set -g base-index 1
# start pane number from 1 similar to windows
set -g pane-base-index 1
# Make the current window the first window
bind T swap-window -t 1
# split panes using \ and -
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
unbind '"'
unbind %
# to cycle through windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind b previous-window
# switch panes using Alt-arrow without prefix
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
set -g default-terminal "tmux-256color"
set -sg terminal-overrides ",*:RGB"
# source .tmux.conf file
bind r source-file ~/.tmux.conf \; display "Configuration Reloaded!"
# enable vi mode
set-window-option -g mode-keys vi
# remap copy paste keys
bind y copy-mode
# unbind p
# bind p paste-buffer
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
source-file "$HOME/.tmux-gitbar/tmux-gitbar.tmux"
# copy to system clipboard
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
# paste from system clipboard
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# neovim
set-option -g focus-events on
# set zsh as default shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
# status bar theme
set -g status-bg 'colour235'
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status 'on'
set -g status-right-length '100'
# set -g message-bg-style 'colour238'
# set -g message-command-bg-style 'colour238'
# set -g message-command-fg-style 'colour222'
# set -g message-fg-style 'colour222'
# set -g pane-active-border-fg-style 'colour154'
# set -g pane-border-fg-style 'colour238'
# set -g status-attr-style 'none'
# set -g status-left-attr-style 'none'
# set -g status-right-attr-style 'none'
# set -g window-status-attr-style 'none'
# setw -g window-status-activity-attr-style 'none'
# setw -g window-status-activity-bg-style 'colour235'
# setw -g window-status-activity-fg-style 'colour154'
# setw -g window-status-bg-style 'colour235'
# setw -g window-status-fg-style 'colour121'
setw -g window-status-separator ''
set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami) #(uptime | cut -d " " -f 1,2,3) #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] %r %a %Y #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #h #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour154] #(rainbarf --remaining --rgb --width 10) '
setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #I #W #F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'