-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
37 lines (31 loc) · 1.51 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
set-option -g prefix C-t
set-option -g status off
set-option -g default-terminal screen-256color
set-option -g terminal-overrides *256col*:colors=256,xterm*:XT
set-option -g set-titles on
set-option -g set-titles-string "#W. #T"
set-option -g display-time 2000
set-option -g history-limit 25000
set-window-option -g mode-keys emacs
set-window-option -g aggressive-resize on
bind-key t send-keys ^T
bind-key ^T last-window
bind-key -n S-Up copy-mode
bind-key -n S-PgUp copy-mode -u
set-option -g mouse on
bind -n WheelUpPane if-shell -F -t= "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# Leave the selection active after mouse drag
unbind-key -Tcopy-mode MouseDragEnd1Pane
# Make Enter copy the selection and quit.
# TODO: Make both enter and M-w also copy-pipe to the clipboard.
bind-key -Tcopy-mode Enter send -X copy-selection-and-cancel
bind-key C-p pipe-pane -o 'tmux display "Logging to ~/tmux.#W.log";\
cat >~/tmux.#W.log;\
tmux display "Logging cancelled."'
# Load macOS specific configuration if running on darwin
if-shell "uname | grep Darwin" "source-file ~/.tmux.conf.macos"
# Set up sessions based on where we're running.
if-shell "! printenv | grep SSH_CLIENT" "source-file ~/.tmux.sessions.terms"
if-shell "! printenv | grep SSH_CLIENT" "source-file ~/.tmux.sessions.multipane"
if-shell "which irssi" "source-file ~/.tmux.sessions.irssi"