-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
114 lines (85 loc) · 2.58 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
113
114
setw -g mode-keys vi
set -g status-keys emacs
set -g default-command "reattach-to-user-namespace -l /bin/zsh"
set -g default-terminal "screen-256color"
set -g history-limit 50000
set -s escape-time 1
setw -g base-index 1 # start window numbers from 1
setw -g pane-base-index 1 # start pane numbers from 1
set-option -g status-keys emacs
set -g mouse on
set-option -g renumber-windows on
set-option -g set-titles on
set-option -g set-titles-string "#{pane_current_command} - #{pane_current_path}"
setw -g monitor-activity on
set -g visual-activity on
## KEYBINDINGS
unbind C-b
set -g prefix C-a
bind a send-prefix
# cycle through panes
unbind ^a
bind ^a select-pane -t :.+
unbind ^x
bind ^x kill-pane
# reload config
unbind r
bind r source-file ~/.tmux.conf\; display "Reloaded"
unbind ^W
bind ^W split-window -p 25 '$EDITOR $(cat ~/.current-project)' \; swap-pane -D
unbind ^T
bind ^T split-window -p 25
# horizontal and vertical splits
unbind |
bind | split-window -h -c "#{pane_current_path}"
unbind -
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind-key -r S-Left swap-window -t -1
bind-key -r S-Right swap-window -t +1
# tile all windows
unbind =
bind = select-layout tiled
unbind Right
bind Right resize-pane -R 8
unbind Left
bind Left resize-pane -L 8
unbind Up
bind Up resize-pane -U 4
unbind Down
bind Down resize-pane -D 4
unbind h
bind h select-pane -L
unbind j
bind j select-pane -D
unbind k
bind k select-pane -U
unbind l
bind l select-pane -R
bind Escape copy-mode
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi Y send -X copy-end-of-line
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi Enter send -X copy-pipe "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi Escape send -X cancel
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
# unbind p
# bind p paste-buffer
# unbind p
# bind p previous-window
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# bind p run "tmux paste-buffer"
unbind m
bind m new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind M
bind M last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
## STATUS BAR
set -g status-bg black
set -g status-fg white
set -g status-interval 1
set -g status-left ' '
set -g status-right '#[fg=yellow]%Y-%m-%d %H:%M#[default] '
setw -g window-status-current-style bg=yellow,fg=black
setw -g window-status-style bg=default,fg=cyan,dim
setw -g window-status-current-style fg=white,bg=red,bright
set -g message-style fg=white,bg=black,bright