-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
137 lines (105 loc) · 4.03 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
136
set -g default-terminal "screen-256color"
set -ga terminal-overrides ',*256col*:Tc'
setw -g mode-keys vi
set -g default-terminal "xterm"
bind i capture-pane -J -S - -E - -b PIPE \; new-window 'tmux save-buffer -b PIPE - | vim -c "set nonumber" -'
# Create new window in same PWD (required since 1.9)
bind-key c neww -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -c "#{pane_current_path}"
bind-key o resize-pane -Z
bind-key O rotate-window -D
bind-key -T copy-mode-vi v send-keys -X begin-selection
# C-a as prefix, like in screen
unbind C-b
set -g prefix C-a
bind-key C-a last-window
set -s escape-time 0
# "Unlimited" history
set -g history-limit 10000
# Notifications on change in window
set -g monitor-activity on
# Break and merge panes
bind-key C-b break-pane -t :
bind-key C-v command-prompt -p "which: " "join-pane -t ':%%'"
bind-key b break-pane -t :
bind-key v command-prompt -p "which: " "join-pane -t ':%%'"
bind-key a send-prefix
# Pane-resize bindings
bind - resize-pane -D 5
bind + resize-pane -U 5
bind < resize-pane -L 5
bind > resize-pane -R 5
# Navigate panes with hjkl
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
# swap panes
bind J swap-pane -D
bind K swap-pane -U
# bind fast session switching
unbind S
bind S command-prompt "switch -t %1"
# Custom status bar
set -g status-right "#(batteryp) %H:%M %d-%h-%Y"
# Reload configuration
bind r source ~/.tmux.conf
bind C-r source ~/.tmux.conf
# Clear activity flags
bind e run tmux-select-each
bind C-e run tmux-select-each
bind y run tmux-detach-other-clients
bind C-y run tmux-detach-ther-clients
bind z run tmux-url-select
bind F1 run "tmux-select-session 1"
bind F2 run "tmux-select-session 2"
bind F3 run "tmux-select-session 3"
bind F4 run "tmux-select-session 4"
bind F5 run "tmux-select-session 5"
bind F6 run "tmux-select-session 6"
bind f display-popup -E tmux-goto-dir
bind C-f display-popup -E tmux-goto-dir
## COLORSCHEME: gruvbox dark
set-option -g status "on"
# default statusbar color
set-option -g status-style bg=colour0,fg=colour15 # bg=bg1, fg=fg1
# default window title colors
set-window-option -g window-status-style bg=colour214,fg=colour0 # bg=yellow, fg=bg1
# default window with an activity alert
set-window-option -g window-status-activity-style bg=colour0,fg=colour248 # bg=bg1, fg=fg3
# active window title colors
set-window-option -g window-status-current-style bg=red,fg=colour0 # fg=bg1
# pane border
set-option -g pane-active-border-style fg=colour250 #fg2
set-option -g pane-border-style fg=colour237 #bg1
# message infos
set-option -g message-style bg=colour0,fg=colour15 # bg=bg2, fg=fg1
# writing commands inactive
set-option -g message-command-style bg=colour0,fg=colour15 # bg=fg3, fg=bg1
# pane number display
set-option -g display-panes-active-colour colour250 #fg2
set-option -g display-panes-colour colour237 #bg1
# clock
set-window-option -g clock-mode-colour colour109 #blue
# bell
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
set-option -g status-justify "left"
set-option -g status-left-style none
set-option -g status-left-length "80"
set-option -g status-right-style none
set-option -g status-right-length "80"
set-window-option -g window-status-separator ""
set-window-option -g window-status-current-format "#[bg=colour12, fg=colour0] #I #W#[fg=colour0,nobold]#{?window_zoomed_flag,/Z,} "
set-window-option -g window-status-format "#{?window_activity_flag,#[bg=colour16],#[bg=colour0]}#{?window_bell_flag,#[bg=colour1],} #[fg=colour15]#I #W#[fg=colour14]#{?window_zoomed_flag,/Z,}#{?window_last_flag,-,} "
set -g status-left-style "bold fg=colour15 bg=colour0"
set -g status-left-length 15
set -g status-left " #S "
set -g status-right "#{pane_current_command} / %H:%M %d-%h "
set -g status-right-style "bold fg=Colour15"
set -g status-right-length 30