-
Notifications
You must be signed in to change notification settings - Fork 5
/
tmux.conf
56 lines (40 loc) · 1.96 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
# Make tmux use my default shell when creating new windows
if-shell "uname | grep -q Darwin" 'set -g default-shell $SHELL';
# Reattach userspace to default shell
#if-shell "uname | grep -q Darwin" 'set -g default-command "reattach-to-user-namespace -l ${SHELL}"';
# Vim Movements
setw -g mode-keys vi
# Vim mode Begin Selection, Copy, and Paste
if-shell "uname | grep -q Darwin" 'bind-key -T copy-mode-vi v send-keys -X begin-selection';
# Update `y` keypress in tmux vim mode to use copy-pipe
if-shell "uname | grep -q Darwin" 'bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"';
# Update MouseDragEnd1Pane to also use copy-pipe
if-shell "uname | grep -q Darwin" 'bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"';
# Update default binding of `Enter` to also use copy-pipe
if-shell "uname | grep -q Darwin" 'unbind-key -T copy-mode-vi Enter';
if-shell "uname | grep -q Darwin" 'bind-key -T copy-mode-vi Enter send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"';
# Mouse support
if-shell "uname | grep -q Darwin" 'set -g mouse on';
# Always use the current directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Move windows (control+shift Left or Right)
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# improve colors
set -g default-terminal 'screen-256color'
# remove administrative debris (session name, hostname, time) in status bar
set -g status-left ''
set -g status-right ''
# soften status bar color from harsh green to light gray
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
# increase scrollback lines
set -g history-limit 10000
# Allows me to rename a window and it will never change after doing so
set-option -g allow-rename off
# Reload tmux config
bind r source-file ~/.tmux.conf
# Create new session if not already created
#new-session -n $HOST