-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
135 lines (112 loc) · 3.75 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
####### Shared tmux configuration #######
#
# source-file ~/dotfiles/.tmux.conf
#
#########################################
### Notes ###
#
# list sessions within tmux
# c-a + s
#
# create new session from within tmux
# :new<cr>
#
# rename session
# c-a + $
#
#
# c-a + w list all windows
# C-a & kill the current window
# C-a , rename the current window
# c-a + c create new window from within tmux
#
# C-a M-up, C-a M-down, C-a M-left, C-a M-right
# resize by 5 rows/columns
# C-a C-up, C-a C-down, C-a C-left, C-a C-right
# resize by 1 row/column
#
# C-a x kill the current pane
# C-a q display pane numbers for a short while
#
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# 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 %
#set-option -g pane-active-border-style "bg=default"
#set-option -ag pane-active-border-style "fg=colour208"
#set inactive/active window styles
set -g window-style 'fg=default,bg=default' #colour234'
set -g window-active-style 'fg=default,bg=default' #'fg=colour2,bg=colour232'
# set the pane border colors
set -g pane-border-fg colour9 #colour234
set -g pane-border-bg default #colour19
set -g pane-active-border-fg colour9 #colour232
set -g pane-active-border-bg default #colour9
set -g mouse on
# text #49A835
#
#statusbar
set -g status-position bottom
set -g status-justify left
set -g status-bg colour9
set -g status-fg colour235
set -g status-attr dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour19,bold] %d/%m #[fg=colour233,bg=colour8,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-fg colour1
setw -g window-status-current-bg colour235
setw -g window-status-bg colour242
setw -g window-status-fg colour9
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
set -g pane-active-bg default
# activate vi mode
set-window-option -g mode-keys vi
# vim bindings for copy mode
bind P paste-buffer
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'V' send-keys -X select-line
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode-vi 'C-v' send-keys -X rectangle-toggle
# don't rename windows automatically
# set-option -g allow-rename off
# List of plugins
# Install with Prefix + I
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-yank'
# For tmux-yank
set -g @shell_mode 'vi'
# bind a reload key
bind R source-file ~/.tmux.conf \; display-message " Config reloaded..".
# Set status right
set -g status-right '#{prefix_highlight} | CPU #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M '
# Make sure shells have full color support
set -g default-terminal "screen-256color"
# Use fish
set-option -g default-shell $(which fish)
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'