-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
46 lines (39 loc) · 1.99 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
if '[ -f ~/.tmux.conf ]' 'source ~/.tmux.conf'
set -g base-index 1
set -g default-terminal "screen-256color"
set -g display-panes-time 800
set -g display-time 1000
set -s escape-time 10
set -s focus-events on
set -g history-limit 5000
set -g monitor-activity on
set -g mouse on
set -g prefix2 C-a
set -g renumber-windows on
set -sg repeat-time 600
set -g set-titles on
set -g status-interval 10
set -g visual-activity off
# Window options
setw -g automatic-rename on
setw -g pane-base-index 1
setw -qg utf8 on
setw -g xterm-keys on
# Keybinds
bind C-f command-prompt -p find-session 'switch-client -t %%'
bind e new-window -n "./.tmux.conf.local" "sh -c '\${EDITOR:-vim} ./.tmux.conf.local && tmux source ./.tmux.conf && tmux display \"./.tmux.conf sourced\"'"
bind C-a send-prefix -2
bind r source-file ./.tmux.conf \; display './.tmux.conf sourced'
bind _ split-window -h
bind - split-window -v
# copy to macOS clipboard
if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"'
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
# copy to X11 clipboard
if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"'
if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'
# copy to Windows clipboard
if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"'
if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"'
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
if '[ -f ./.tmux.conf.local ]' 'source ./.tmux.conf.local'