forked from FruitieX/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
134 lines (107 loc) · 3.59 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
# split windows like vim
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# move around panes with hjkl, as one would in vim after pressing ctrl-w
#bind h select-pane -L
#bind j select-pane -D
#bind k select-pane -U
#bind l select-pane -R
# resize panes like vim
bind-key C-h resize-pane -L 5
bind-key C-j resize-pane -D 5
bind-key C-k resize-pane -U 5
bind-key C-l resize-pane -R 5
# smart pane switching with awareness of vim splits
bind -n C-h run "~/bin/tmux_paneswitch.sh L"
bind -n C-j run "~/bin/tmux_paneswitch.sh D"
bind -n C-k run "~/bin/tmux_paneswitch.sh U"
bind -n C-l run "~/bin/tmux_paneswitch.sh R"
bind -n C-\ run "~/bin/tmux_paneswitch.sh \\\\"
# clear screen
bind C-c send-keys 'C-l'
# ctrl-tab & ctrl-shift-tab
bind -n C-Tab next-window
bind -n C-S-Tab previous-window
# smart pane switching with awareness of vim splits
#bind -n C-1 select-window -t 1
#bind -n C-2 select-window -t 2
#bind -n C-3 select-window -t 3
#bind -n C-4 select-window -t 4
#bind -n C-5 select-window -t 5
# move panes like vim
bind H swap-pane -U
bind L swap-pane -D
bind J swap-pane -D
bind K swap-pane -U
# bind : to command-prompt like vim
#bind : command-prompt
# vi-style controls for copy mode
setw -g mode-keys vi
# Sane scrolling
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Fix function keys
setw -g xterm-keys on
# resize a window based on the smallest client actually viewing it,
# not on the smallest one attached to the entire session.
setw -g aggressive-resize on
# set prefix key to C-a, same as GNU screen
unbind C-b
set -g prefix C-a
# C-a C-a = last active window, as in GNU screen
bind-key C-a last-window
# C-a a to pass through commands bound by tmux
bind-key a send-prefix
# Start window numbering at 1
set -g base-index 1
# Faster command sequences by disabling wait time for escape sequence
set -s escape-time 0
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity off
set -g visual-bell off
#set -g bell-action none
# Border colors
set -g pane-border-fg "#$inactive_fg"
set -g pane-border-bg default
set -g pane-active-border-fg "#$active_fg"
set -g pane-active-border-bg default
# Set status bar
set -g status-bg default
set -g status-fg "#$active_fg"
set-option -g status on
set-option -g status-interval 1
set-option -g status-utf8 on
set-option -g status-justify "left"
set-option -g status-left-length 80
set-option -g status-right-length 130
set-option -g status-left ""
set-option -g status-right "#h"
set-option -g status-position top
setw -g window-status-format "#[fg=#$inactive_fg]#I #W "
setw -g window-status-current-format "#[fg=#$active_fg]#I #W "
#setw -g window-status-current-attr dim
set-window-option -g window-status-separator " "
set-window-option -g window-status-bell-bg default
set-window-option -g window-status-bell-fg red
set-window-option -g window-status-bell-attr none
set-window-option -g window-status-activity-bg default
set-window-option -g window-status-activity-fg cyan
set-window-option -g window-status-activity-attr none
# pane movement
bind-key C-m break-pane
bind-key m command-prompt -p "move pane to:" "move-pane -t ':%%'"
# look good
set -g default-terminal "screen-256color"
# urlview for opening urls easily
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n "urlview" '$SHELL -c "urlview < /tmp/tmux-buffer"'
# mouse support
#setw -g mode-mouse on
#setw -g mouse-select-pane on
# yank/put like vim
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection