-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
60 lines (45 loc) · 2.33 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
# Advanced Pane Movement
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
bind -n C-v run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-v) || tmux split-window -h"
bind -n C-b run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-b) || tmux split-window -v"
bind -n C-g run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-g) || tmux kill-pane"
bind -n C-y run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-y) || tmux copy-pipe 'cat | ssh -p 47260 localhost pbcopy'"
# improve colors
set -g default-terminal "tmux"
set -s escape-time 0
# soften status bar color from harsh green to light gray
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
# status bar message
set -g status-left "#[fg=cyan]#S:#I.#P #h"
set -g status-left-length 20
set -g status-right "#[fg=cyan]#28T #[fg=blue,bold]%d %b %R"
set -g status-right-length 40
set -g status-justify centre
# remove administrative debris (session name, hostname, time) in status bar
set -g status-left ''
set -g status-right ''
# remap prefix to Control + a
set -g prefix C-a
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b
# Adjust split commands
unbind %
unbind '"'
bind | split-window -h
bind - split-window -v
set-option -g history-limit 5000
# Reload Conf
unbind r
bind r source-file ~/.tmux.conf
# Mouse
set -g mouse on
# Start copy mode when scrolling up and exit when scrolling down to bottom.
# The "#{mouse_any_flag}" check just sends scrolls to any program running that
# has mouse support (like vim).
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode '"