-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.tmux.conf
111 lines (91 loc) · 2.94 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
# Make it use C-a, similar to screen..
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Reduce tmux delay for more responsiveness
set -sg escape-time 1
# vim-like bindings
set-window-option -g mode-keys vi
# vim -style copying and pasting
unbind [
unbind p
bind ] copy-mode
bind [ paste-buffer
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind -t vi-copy Escape cancel
# go to last used window
bind C-a last-window
# go to last used pane
bind a last-pane
# Reload key
bind r source-file ~/.tmux.conf \; display "Reloaded tmux config file."
bind | split-window -h
bind _ split-window -v
# vim-style movement
unbind Up ; bind h select-pane -L
unbind Down ; bind j select-pane -D
unbind Left ; bind k select-pane -U
unbind Right ; bind l select-pane -R
unbind C-Up ; bind -r M-h resize-pane -L
unbind C-Down ; bind -r M-j resize-pane -D
unbind C-Left ; bind -r M-k resize-pane -U
unbind C-Right ; bind -r M-l resize-pane -R
unbind M-Up ; bind -r C-h resize-pane -L 5
unbind M-Down ; bind -r C-j resize-pane -D 5
unbind M-Left ; bind -r C-k resize-pane -U 5
unbind M-Right ; bind -r C-l resize-pane -R 5
set -g default-terminal "screen-256color"
#set -g status-bg colour235
set -g history-limit 4000
# number windows starting from 1
set -g base-index 1
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# mouse support
set -g mouse-select-pane on
set -g mouse-select-window on
set -g mouse-resize-pane on
set -g mouse-utf8 on
setw -g mode-mouse on
# Highlight active window
set-window-option -g window-status-current-bg green
set-window-option -g window-status-current-fg black
set-window-option -g window-status-activity-bg white
set-window-option -g window-status-activity-fg red
# TMux coloring
set -g status-fg white
#set -g status-bg black
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# THEME
set -g status-position bottom
set -g status-interval 10
set -g status-bg black
set -g status-fg green
set -g status-left-length 30
NETDEV="/mnt/melchior/projects/netdev"
# Custom layouts
bind-key M-z new-window -n 'netdev' -t 2 -c $NETDEV \; \
select-window -t 'netdev' \; \
send-keys 'tail -f /var/log/messages | grep -v sudo' 'Enter' \; \
split-window -v -p 50 -t 2 -c $NETDEV \; \
send-keys 'cd server' 'Enter' \; \
send-keys './server' 'Enter' \; \
split-window -h -p 50 -t 2 -c $NETDEV \; \
send-keys 'cd kernel' 'Enter' \; \
send-keys 'make -j6 && sudo rmmod netdev ; sudo insmod netdev.ko' 'Enter' \; \
select-pane -t 2