-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
109 lines (87 loc) · 3.66 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
set-option -g prefix C-x
unbind-key C-b
bind-key C-x send-prefix
set-option -s escape-time 0
set-option -g focus-events on
set-option -sa terminal-overrides ',alacritty:RGB,xterm-kitty:RGB'
# Use emacs-style keys in the command prompt.
set-option -g status-keys emacs
# Use vi-style keys in copy mode.
set-window-option -g mode-keys vi
unbind-key -Tcopy-mode-vi v # rectangle-toggle (??)
bind-key -Tcopy-mode-vi v send-keys -X begin-selection
bind-key -Tcopy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -Tcopy-mode-vi | send-keys -X copy-pipe
# Colemak movement keys (and related remappings).
unbind-key -Tcopy-mode-vi k # cursor-up
bind-key -Tcopy-mode-vi k send-keys -X search-again
unbind-key -Tcopy-mode-vi n # search-again
unbind-key -Tcopy-mode-vi e # end of word
bind-key -Tcopy-mode-vi h send-keys -X cursor-left
bind-key -Tcopy-mode-vi n send-keys -X cursor-down
bind-key -Tcopy-mode-vi e send-keys -X cursor-up
bind-key -Tcopy-mode-vi i send-keys -X cursor-right
bind h select-pane -L
bind n select-pane -D
bind e select-pane -U
bind i select-pane -R
# Allow choosing session groups from the tree (-G),
# and sort them by name (-O name).
# Default is just choose-tree -s.
bind-key s choose-tree -sGO name
bind-key bspace previous-window
bind-key ' ' next-window
bind-key - last-window
bind-key x command-prompt
bind-key l lock-server
bind-key . attach-session -t . -c "#{pane_current_path}"\; \
display-message "session path set to #{pane_current_path}"
# I have lots of memory, and I need more history!
set-option -g history-limit 20000
#set-option -g status off
set-option -g status-style bg=default
set-option -g status-style fg=default
set-option -g status-left "(#[fg=blue]#S#[default])"
set-option -g status-left-length 20
set-option -g status-right "%H:%M"
set-option -g status-justify centre
set-option -g window-status-format " #[fg=white,dim]#I:#[default]#W "
set-option -g window-status-current-format " #[fg=white,dim]#I:#[default]#[underscore]#W#[default] "
set-option -g set-titles on
set-option -g default-terminal "tmux-256color"
# set-option -g default-terminal "screen-256color"
#set-option -g mouse-select-pane on
#set-option -g mouse-select-window on
#set-window-option -g mode-mouse on
bind-key r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf."
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Allow programs to rename their windows.
# Use e.g. `printf "\033kNEW_NAME_HERE\033\\"`.
set-option -gw allow-rename on
# Start numbering at 1.
set-option -g base-index 1
set-window-option -g pane-base-index 1
# Renumber remaining windows when one is closed.
set-option -g renumber-windows on
# default-command is the command that is run in a new window.
# default-shell is the shell that is used to run the default command.
#
# If these are empty, then tmux will start your default shell as a login
# shell, which causes the system paths to be put at the front of PATH,
# which wreaks havoc with asdf.
#
# This tells tmux to start a non-login dash shell and use that to find
# fish and run it.
set-option -g default-shell /bin/sh
set-option -g default-command fish
# However, one must set an absolute path for default-shell, and it has
# to be a valid shell at the time it is set.
#
# I'm using /bin/sh as a portable default that tmux shouldn't complain
# about on any system. But /bin/sh is bash on macOS, and I'd rather use
# the faster dash. This configuration also runs on FreeBSD systems,
# where dash is not available by default, gets put at
# /usr/local/bin/dash if you choose to install it, and then isn't an
# "acceptable shell" for tmux regardless. And that's all silly, since
# I'm fine with /bin/sh on a BSD.
source-file -q ~/.tmux.os-specific.conf