-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtmux.conf
79 lines (61 loc) · 2.42 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
# Set a Ctrl-a shortcut for reloading your tmux config
unbind r
bind r source-file ~/.tmux.conf
set -g default-terminal "screen-256color"
# Rename your terminals
#set -g set-titles on
#set -g set-titles-string '#(whoami)::#h::#(curl ipecho.net/plain;echo)'
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Status bar customization
#set -g status-utf8 on
#set -g status-bg black
#set -g status-fg white
#set -g status-interval 5
#set -g status-left-length 90
#set -g status-right-length 60
#set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=blue] \
#(hostname - s)#[fg=white]::##[fg=yellow]#(curl ipecho.net/plain;echo)"
#export POWERLINE_CONFIG_COMMAND='~/dotfiles/vim/bundle/powerline/scripts/powerline-config'
source ~/dotfiles/vim/bundle/powerline/powerline/bindings/tmux/powerline.conf
#set -g status-right '#(.local/bin/powerline tmux right)'
# prevent tabs from being automatically renamed
setw -g automatic-rename off
set-option -g allow-rename off
#set -g status-justify left
#set -g status-right '#[fg=Cyan]#S #[fg=white]%a %d %b %R'
# Remap window navigation to vim
unbind-key h
#bind-key h select-pane -L
unbind-key t
#bind-key t select-pane -D
unbind-key n
#bind-key n select-pane -U
unbind-key s
#bind-key s select-pane -R
unbind-key b
bind-key b next-window
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-t run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-n run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-s run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# Toggle mouse on
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
# remove input delays:
set -sg escape-time 0