-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
72 lines (54 loc) · 1.69 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
run-shell "powerline-daemon -q"
source $HOME/.powerline/powerline/bindings/tmux/powerline.conf
#source $HOME/.tmux/powerline.tmux.conf
set-option -g default-terminal "screen-256color"
set-option -g repeat-time 0
# allow native scrollback
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Powerline statusbar
# use | and - for spliting windows
unbind %
bind | split-window -h
bind - split-window -v
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
# Visit last window by pressing ctrl+a twice
bind-key C-a last-window
# Allow titles for windows and set them to user@host unless otherwise set
set -g set-titles on
set -g set-titles-string "#T"
# Start numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize off
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
#vim style pane selection
unbind-key j
bind-key j select-pane -D
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
#layout bindings
bind-key / source-file ~/.tmux/layout1
bind-key . source-file ~/.tmux/work-layout
#new window binding
bind-key C-n new-window
# Bind mouse mode && toggle mouse on
# Toggle mouse on with ^B m
bind m \
set -g mouse on \;\
display 'Mouse: ON'
# Toggle mouse off with ^B M
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
set -g mouse on
if-shell "type 'reattach-to-user-namespace' >/dev/null" "set -g default-command 'reattach-to-user-namespace -l $SHELL'"