Tmux configuration
From wikinotes
This page documents some commands I use most frequently.
Documentation
keybindings https://man.archlinux.org/man/community/tmux/tmux.1.en#KEY_BINDINGS mouse https://man.archlinux.org/man/community/tmux/tmux.1.en#MOUSE_SUPPORT
Locations
~/.tmux.conf
config
Commands
notifications
set -g display-time 5000 # message display duration display-message -c /dev/pts/0 'hello world' # show a messageterminal
set -g default-terminal "screen-256color" # desired $TERM value set -g visual-bell off set -g visual-activity off set -g bell-action currentmouse
set -g mouse onstatusbar
set -g pane-base-index 1 set -g status-position top setw -g clock-mode-style 2source-file
source-file ${FILE} # import filekeybindings
See KEYBINDINGS section in man page.
Keys are bound within tables. by default, they are bound to the
prefix
table (active following tmux-prefix keyseq).
Keys executed without a prefix are defined in theroot
table.
bind
andbind-key
can be used interchangeably.tmux bind-key \ [-n] `# bind w/o prefix (root table)` \ [-r] `# repeatable` \ [-N ${NOTE}] \ [-T ${KEY_TABLE}] \ ${KEY} \ ${TMUX_COMMAND} ${ARGUMENTS[@]}bind-key F1 set-option status off # bind key-sequence bind-key -n M-0 select-window -t 10 # bind key-sequence to root table (no prefix reqd) unbind C-b # unbind key-sequencetmux prefix
set -g prefix 'M-a' # set (additional) alternative tmux-prefixenable vi mode
set -g mode-keys vi set -g status-keys vi