-
Notifications
You must be signed in to change notification settings - Fork 5
/
.tmux.conf
84 lines (70 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
# Use backtick as the prefix
# Do it just like this or you will not
# be able to use type backtick literally
unbind C-b
set -g prefix `
bind ` send-prefix
bind-key L last-window
set -g default-terminal "screen-256color"
# Start numbering at 1
set -g base-index 1
# Make mouse useful in copy mode
#setw -g mode-mouse on
#
# Allow mouse to select which pane to use
#set -g mouse-select-pane on
#
#
# # Scroll History
set -g history-limit 30000
#
# # Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
#
# Basically allows for faster key repetition
set -s escape-time 0
# Set status bar
set -g status-justify left
set -g status-bg black
set -g status-fg white
set-option -g status-interval 5
set -g status-right-length 150
set -g status-left ""
set -g status-right "#[fg=white] %m-%d-%Y %H:%M [email protected]"
# Revert to Pre 1.9a split pane current working
# directory behavior
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Allows us to use '<prefix>-a' <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Highlight active window
set-window-option -g window-status-current-style "bg=red"
# Turn on vi bindings in copy mode
set-option -g status-keys vi
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
# if-shell just needs one set of brackets for Ubuntu 22.04
if-shell '[ $(uname -s) = Linux ]' {
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
} {
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'pbcopy'
}
# Move around panes vim style
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#unbind C-7
bind-key M-7 resize-pane -t 1 -x 90
bind-key M-8 resize-pane -t 1 -x 60
bind-key M-9 resize-pane -t 1 -x 30
bind-key M-0 resize-pane -t 0 -x 30
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key M split-window -h "vim ~/.tmux.conf"