-
Notifications
You must be signed in to change notification settings - Fork 7
/
tmux.conf
95 lines (75 loc) · 2.17 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
set -g default-terminal "screen-256color"
set -g history-limit 8192
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# use VI
set-window-option -g mode-keys vi
# Use ctrl-a instead of ctrl-b
set -g prefix C-a
unbind C-b
bind C-a send-prefix
unbind a
bind a send-keys ^a
# I got scroll buttons like the day is long
# set -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
# source-file ~/Dotfiles/tmux.conf
# This is a neat trick, when someone attaches only resize to smaller screen
# if they are looking at it.
setw -g aggressive-resize on
unbind ^x
bind ^x kill-pane
# Last window toggle with double tap
bind-key C-b last-window
# reload config
unbind r
bind r source-file ~/.tmux.conf
# horizontal and vertical splits
unbind |
bind | split-window -h
unbind _
bind _ split-window
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 j
bind j select-pane -L
unbind k
bind k select-pane -D
unbind i
bind i select-pane -U
unbind l
bind l select-pane -R
# “zoom” feature. Focused on a given pane, ^B + will promote pane to be its own window.
# Then you can do OS-native mark and copy. When done, just use ^B - to turn the window back into a pane, right where it was before.
unbind +
bind + \
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
swap-pane -s tmux-zoom.0 \;\
select-window -t tmux-zoom
unbind -
bind - \
last-window \;\
swap-pane -s tmux-zoom.0 \;\
kill-window -t tmux-zoom
# status bar
set -g status-bg colour94
set -g status-fg colour233
set -g status-interval 10
set -g status-left ' '
set-window-option -g window-status-current-bg colour172
set-window-option -g window-status-current-fg colour233
# Start the window numbering at 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
set-option -g default-shell /usr/local/bin/zsh
# so we can launch kaleidoscope with mergetool, use pbcopy, etc
set-option -g default-command "reattach-to-user-namespace -l /usr/local/bin/zsh"
# scrollback limit
set -g history-limit 999999999