-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
83 lines (68 loc) · 2.52 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
#
# Add:
# source-file ~/.env/tmux.conf
# to ~/.tmux.conf
set-option -g status-position top
set -g renumber-windows on
# See https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed
# or nvim :checkhealth
#
# 256 colors
# .vimrc needs corresponding settings
set-option -g default-terminal "screen-256color"
# set-option -g default-terminal "tmux-256color"
# set-option -g default-terminal "xterm-256color"
# Make vim <esc> quick
set -sg escape-time 10
# (n)vim things like autoread might need this
set-option -g focus-events on
# tmux/true colours?
# set-option -sa terminal-overrides ',xterm-256color:RGB'
set-option -sa terminal-overrides ',*256col*:Tc'
# too annoying, need to shift click everything
#set -g mouse on
# This means that tmux will update its env vars, but only tmux, not
# already open panes
set-option -ga update-environment ' DISPLAY SSH_AUTH_SOCK SSH_CONNECTION SESSION_MANAGER'
# export $(tmux show-environment | grep "^DISPLAY")
#set-env -g XAUTHORITY $HOME/.Xauthority
set -g history-limit 10000
# Shift arrow to switch windows
bind-key -n S-Left previous-window
bind-key -n S-Right next-window
# ctrl-shift arrow to move windows
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# bind-key -n S-PageUp swap-window -t -1
# bind-key -n S-PageDown swap-window -t +1
# bind h select-pane -L
# bind j select-pane -D
# bind k select-pane -U
# bind l select-pane -R
# bind-key v split-window -h
# bind-key s split-window -v
# bind-key J resize-pane -D 5
# bind-key K resize-pane -U 5
# bind-key H resize-pane -L 5
# bind-key L resize-pane -R 5
# bind-key M-j resize-pane -D
# bind-key M-k resize-pane -U
# bind-key M-h resize-pane -L
# bind-key M-l resize-pane -R
# # Use Alt-vim keys without prefix key to switch panes
# bind -n M-h select-pane -L
# bind -n M-j select-pane -D
# bind -n M-k select-pane -U
# bind -n M-l select-pane -R
# # Use Alt-arrow keys without prefix key to switch panes
# bind -n M-Left select-pane -L
# bind -n M-Right select-pane -R
# bind -n M-Up select-pane -U
# bind -n M-Down select-pane -D
# is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
# bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
# bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
# bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
# bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"