-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
113 lines (85 loc) · 3.13 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
# Wrapper script to enable pasteboard access on Mac OS X
set -g default-command "reattach-to-user-namespace -l bash"
# Use a more comfortable prefix binding
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
# Make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# Tip from the PragProg tmux book: tmux adds a very small delay when sending
# commands, and this delay can interfere with other programs such as the Vim
# text editor. We can set this deplay so it’s much more reponsive.
set -s escape-time 1
# Start window index at 1
set -g base-index 1
# Start pane index at 1
setw -g pane-base-index 1
# Completely disable the mouse
setw -g mouse off
# Use Vim keybindings to move around in a buffer (copy mode)
setw -g mode-keys vi
# Notify when something happens in one of the other windows of the session
setw -g monitor-activity on
set -g visual-activity on
# Update cycle for the status bar in seconds
set -g status-interval 60
# These appearance settings are inspired a lot by @aziz’s dotfiles.
# @see https://github.com/aziz/dotfiles
# Set the status line’s colors
set -g status-fg colour8
set -g status-bg colour11
# Set the color of the window list
setw -g window-status-format '#[bg=colour8,fg=colour11] #I #W '
# Set colors for the active window
setw -g window-status-current-fg colour15
setw -g window-status-current-bg colour166
setw -g window-status-current-format ' #I #W '
# Visual appearance of the command line and alert messages
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# Make the active pane extremely noticeable
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg black
set -g pane-active-border-bg yellow
# Status line left side
set -g status-left-length 60
set -g status-left '⡇ #[bold]❐ #S#[default] ⢸'
# Status line right side
set -g status-right-length 60
set -g status-right '⡇ #[bold]#(whoami) ● #H#[default] '
# Reload the tmux configuration file
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Send Ctrl-a to an application running within tmux by pressing Ctrl-a twice
bind C-a send-prefix
# Easier to remember split bindings for creating panes
bind | split-window -h
bind - split-window -v
# More Vim-like movement between panes.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# More Vim-like movement between windows.
# They are repeatable because of the -r flag.
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# More Vim-like bindings for resizing panes.
# They are repeatable because of the -r flag.
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Move windows left and right
bind -r S-Left swap-window -t -1
bind -r S-Right swap-window -t +1
# Copy and paste bindings similar to Vim
unbind [
bind Enter copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "tmux set-buffer \"$(reattach-to-user-namespace pbpaste)\"; tmux paste-buffer"