-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
117 lines (93 loc) · 2.96 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
#Make copy/paste work on mac
#(first do brew install reattach-to-user-namespace)
set-option -g default-command "tmux rename-window base; reattach-to-user-namespace -l zsh"
#change prefix to control+a
unbind C-b
set -g prefix C-u
#don't rename my window
set-window-option -g automatic-rename
#set scrollback number of lines
set -g history-limit 50000
#allow mouse scrolling in copy-mode
setw -g mode-mouse on
#set window indexing at 1
set -g base-index 1
#default path to current directory
#set-option default-path "$PWD"
# listen for activity on all windows
set -g bell-action any
#set -g bell-action none
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
#Change copy/paste to vim-like
bind p paste-buffer
bind P choose-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
##################################################
## status bar
##################################################
# Put the status bar on top (doesn't work unless tmux 1.7)
#set-option -g status-position top
# Set bg for active window
set-window-option -g window-status-current-bg red
# status bar colors
set -g status-bg blue
set -g status-fg white
#status left
#set -g status-left '#[fg=green]#(hostname | cut -d "." -f 1)'
##################################################
## window
##################################################
#unbind %
bind - split-window -v
#unbind '"'
bind | split-window -h
#swap windows left and right
bind-key -r < swap-window -t -
bind-key -r > swap-window -t +
# navigate windows using hl, and ctrl-hl (no prefix)
bind-key -r h select-window -t :-
bind-key -r l select-window -t :+
bind-key -nr C-h select-window -t :-
bind-key -nr C-l select-window -t :+
# Ctrl-Left/Right cycles thru windows (no prefix)
bind-key -n "C-Left" select-window -t :-
bind-key -n "C-Right" select-window -t :+
##################################################
## pane
##################################################
# navigate panes using jk, and ctrl+jk (no prefix)
bind-key -r j select-pane -t :.-
bind-key -r k select-pane -t :.+
bind-key -nr C-j select-pane -t :.-
bind-key -nr C-k select-pane -t :.+
# Ctrl-Up/Down cyles thru panes (no prefix)
bind-key -n "C-Up" select-pane -t :.-
bind-key -n "C-Down" select-pane -t :.+
# swap panes
bind-key -r J swap-pane -D
bind-key -r K swap-pane -U
# resize pane with arrow keys
# -r: can be repeated without pressing prefix
# again (500ms after last '-r' action or prefix)
unbind Left
unbind Right
unbind Down
unbind Up
bind -r Left resize-pane -L 2
bind -r Right resize-pane -R 2
bind -r Down resize-pane -D 2
bind -r Up resize-pane -U 2
set -g mouse-select-pane on
# Vi like navigation of panes
#setw -g mode-keys vi # I especially like being able to search with /,? when in copy-mode
#unbind-key j
#bind-key j select-pane -D # Similar to 'C-w j' to navigate windows in Vim
#unbind-key k
#bind-key k select-pane -U
#unbind-key h
#bind-key h select-pane -L
#unbind-key l
#bind-key l select-pane -R