-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
36 lines (32 loc) · 1.24 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
# Rebind C-a to tmux prefix.
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
{{#if (eq dotter.os "unix")}}
# Tmux options.
set -g default-command "${SHELL}" # Use non-login shells.
{{/if}}
{{#if dotter.packages.neovim}}
# Smart pane switching
bind -n C-k if "[ $(tmux display -p '#{pane_current_command}') = nvim ]" "send-keys C-k" "select-pane -U"
bind -n C-j if "[ $(tmux display -p '#{pane_current_command}') = nvim ]" "send-keys C-j" "select-pane -D"
bind -n C-h if "[ $(tmux display -p '#{pane_current_command}') = nvim ]" "send-keys C-h" "select-pane -L"
bind -n C-l if "[ $(tmux display -p '#{pane_current_command}') = nvim ]" "send-keys C-l" "select-pane -R"
{{/if}}
# Options.
set-option -sg escape-time 0
set-option -g status-right "#h|%Y-%m-%d %H:%M"
set-option -g set-titles on
set-option -g set-titles-string "#I:#T"
set-option -ga update-environment " SSH_CLIENT SSH_TTY"
# Window options.
set-window-option -g base-index 1
{{#if tmux.default-terminal}}
set-window-option -g default-terminal "{{tmux.default-terminal}}"
{{/if}}
set-window-option -g display-time 3000
set-window-option -g mode-keys vi
set-window-option -g mouse on
set-window-option -g renumber-windows on
set-window-option -g status-keys vi
set-window-option -g xterm-keys on