2019-06-05 17:41:25 -07:00
|
|
|
# tweak colors used by tmux
|
|
|
|
set -g status-style bg=cyan,fg=black
|
|
|
|
set -g window-status-current-style bg=black,fg=white
|
2019-06-05 19:07:55 -07:00
|
|
|
set -g mode-style bg=cyan,fg=black
|
2019-06-05 16:03:15 -07:00
|
|
|
|
|
|
|
# replace default prefix key
|
|
|
|
set -g prefix C-Space
|
|
|
|
unbind C-b
|
|
|
|
bind C-Space send-prefix
|
|
|
|
|
|
|
|
# use vi-style keybindings
|
|
|
|
# this also makes hitting Enter exit copy-mode, which is a godsend
|
|
|
|
setw -g mode-keys vi
|
|
|
|
|
|
|
|
# remove delay on escape key
|
|
|
|
set -sg escape-time 0
|
|
|
|
|
2019-06-13 03:48:02 -07:00
|
|
|
# set the terminal title to the current window's
|
2019-06-05 17:41:25 -07:00
|
|
|
set -g set-titles on
|
2019-06-13 03:48:02 -07:00
|
|
|
set -g set-titles-string '#{host}: #{pane_title}'
|
|
|
|
|
|
|
|
# set the default terminal to tmux instead of pretending to be screen.
|
|
|
|
# NOTE: netbsd-curses requires a terminfo.cdb to be built with tmux support.
|
|
|
|
# for my own convenience:
|
|
|
|
# curl https://eaguru.guru/t/terminfo.cdb -o /usr/share/terminfo.cdb
|
|
|
|
set -g default-terminal "tmux-256color"
|
2019-06-05 17:41:25 -07:00
|
|
|
|
|
|
|
# set right-hand status line text, default: "#{=21:pane_title}" %H:%M %d-%b-%y
|
2019-06-13 03:48:02 -07:00
|
|
|
set -g status-right "#{=21:host} %Y/%m/%d %R"
|
2019-06-05 16:03:15 -07:00
|
|
|
|
|
|
|
# increase scrollback lines from 2000
|
|
|
|
set -g history-limit 10000
|
|
|
|
|
2019-06-05 17:41:25 -07:00
|
|
|
# increase message time from 750ms
|
|
|
|
set -g display-time 2500
|
|
|
|
|
2019-06-05 16:03:15 -07:00
|
|
|
# jump into copy-mode for Shift+PgUp, scroll half a page instead of a full page
|
|
|
|
# switching modes is not ideal but it's the only way to scroll within tmux
|
|
|
|
bind -n S-PgUp copy-mode \; send-keys -X halfpage-up
|
2019-06-05 19:09:14 -07:00
|
|
|
bind -n S-Home copy-mode \; send-keys -X history-top
|
2019-06-05 16:03:15 -07:00
|
|
|
|
2019-06-05 19:09:14 -07:00
|
|
|
# bind Shift+PgUp/PgDn/Home/End to Do The Right Thing™
|
2019-06-05 16:03:15 -07:00
|
|
|
bind -T copy-mode-vi S-PgUp send-keys -X halfpage-up
|
|
|
|
bind -T copy-mode-vi S-PgDn send-keys -X halfpage-down
|
2019-06-05 19:09:14 -07:00
|
|
|
bind -T copy-mode-vi S-Home send-keys -X history-top
|
2019-06-05 19:11:48 -07:00
|
|
|
bind -T copy-mode-vi S-End send-keys -X history-bottom \; send-keys -X cancel
|
2019-06-05 16:03:15 -07:00
|
|
|
|
|
|
|
# Ctrl+PgUp/PgDn to navigate windows (like web browsers)
|
|
|
|
bind -n C-PgUp previous-window
|
|
|
|
bind -n C-PgDn next-window
|
|
|
|
|
|
|
|
# Ctrl+Shift+PgUp/PgDn to reorder windows (like web browsers)
|
|
|
|
bind -n C-S-PgUp swap-window -t -1
|
|
|
|
bind -n C-S-PgDn swap-window -t +1
|
|
|
|
|
|
|
|
# Shift+Arrows to switch panes
|
|
|
|
bind -n S-Left select-pane -L
|
|
|
|
bind -n S-Right select-pane -R
|
|
|
|
bind -n S-Up select-pane -U
|
|
|
|
bind -n S-Down select-pane -D
|
|
|
|
|
|
|
|
# Ctrl+Arrows to create panes
|
|
|
|
#bind -n C-Down split-window -v
|
|
|
|
#bind -n C-Up split-window -v -b
|
|
|
|
#bind -n C-Right split-window -h
|
|
|
|
#bind -n C-Left split-window -h -b
|
|
|
|
|
|
|
|
# convenient binds
|
|
|
|
# overrides refresh-clients
|
|
|
|
#bind r source-file ~/.tmux.conf
|
|
|
|
# overrides choose-tree -Zs
|
|
|
|
#bind s split-window -v
|
|
|
|
# doesn't override anything
|
|
|
|
bind v split-window -h
|
|
|
|
# doesn't override anything (assuming prefix key was changed)
|
|
|
|
bind b split-window -v
|
|
|
|
# overrides confirm-before -p "kill-pane #P? (y/n) " kill-pane
|
|
|
|
bind x kill-pane
|