-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
executable file
·72 lines (58 loc) · 2.15 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
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Highlight active Window
set-window-option -g window-status-current-bg red
set-window-option -g window-status-current-fg white
set -g status-bg colour235
set -g status-fg white
# Start window and pane indices at 1.
set -g base-index 1
set -g pane-base-index 1
# Reload tmux conf.
unbind r
bind r source-file ~/.tmux.conf\; display "Reloaded conf."
# Setting default to mouse on
setw -g mouse on
#setw -g mouse-resize-pane on
#setw -g mouse-select-pane on
#setw -g mouse-select-window on
# Toggle mouse on with ^B m
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 with ^B M
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'
set -g history-limit 5000
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-selection copy-pipe "reattach-to-user-namespace pbcopy"
bind y run-shell "tmux show-buffer | pbcopy" \; display-message "Copied tmux buffer to system clipboard"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# using reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Navigation
# set-window-option mode-keys vi
# Powerline
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 80
set-option -g status-right-length 90
set-option -g status-left "#(~/.dotifles/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/.dotifles/tmux-powerline/powerline.sh right)"
set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"