-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
91 lines (71 loc) · 2.44 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
# set ctrl-a as prefix
set -g prefix C-a
unbind-key C-b
# use ctrl-a ctrl-a (yeah, just press it twice) to send C-a to window
bind-key C-a send-prefix
# renumber windows as they're closed
set -g renumber-windows on
# enable the mouse
set-window-option -g mouse on
# use vi keys
set-window-option -g mode-keys vi
# remap Copy mode keys to give them vi feel
unbind-key [
bind-key Escape copy-mode
# use 256 colors
set -g default-terminal "screen-256color"
# do not start login shell because it cause problems (like PATH modified two
# times instead of one). Use regular shell instead.
set -g default-shell "/usr/bin/zsh"
# statusbar is black on green, centered
set -g status-style fg=colour244,bg=black
set -g status-justify centre
# make message bar white-on-black, bold
set -g message-style fg=white,bg=black,bright
# active window is highlighted as black on yellow
set-window-option -g window-status-current-style fg="#ffcc00",bg=black
# maximal length of left part of statusbar
set -g status-left-length 32
set -g status-left "#S @ #h"
# activity notifications
set-window-option -g monitor-activity on
set -g visual-activity on
# Notify apps when their pane is focused; e.g. it makes Vim reload the file.
set -g focus-events on
# use hjkl to navigate through panes
unbind-key k
bind-key k select-pane -U
unbind-key j
bind-key j select-pane -D
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
# use HJKL to resize panes
unbind-key K
bind-key -r K resize-pane -U 2
unbind-key J
bind-key -r J resize-pane -D 2
unbind-key H
bind-key -r H resize-pane -L 2
unbind-key L
bind-key -r L resize-pane -R 2
# detach with Prefix C-d (prefix starts with Ctrl, so it's easier to type than Prefix d)
unbind-key C-d
bind-key C-d detach-client
# reload config with Prefix r
bind-key r source-file ~/.tmux.conf
# Swap default split hotkeys; I find them more intuitive that way
bind-key "\"" split-window -h
bind-key % split-window -v
# Use Prefix m to jump to the next window with activity in it
unbind-key M-n # doesn't work for me
bind-key m next-window -a
# pass through the title changes, so that when zsh runs precmd() or preexec(),
# the urxvt where tmux is running change its title
set -g set-titles on
# when precmd/preexec is run, it first sets the name for a pane, and then we
# propagate it into the window title
set -g set-titles-string "#T"
# copy text to system buffer with prefix-y
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'wl-copy'