xref: /netbsd-src/external/bsd/tmux/dist/example_tmux.conf (revision f8cf1a9151c7af1cb0bd8b09c13c66bca599c027)
1ed4e6cd4Schristos#
2ed4e6cd4Schristos# Example .tmux.conf
3ed4e6cd4Schristos#
4ed4e6cd4Schristos# By Nicholas Marriott. Public domain.
5ed4e6cd4Schristos#
6ed4e6cd4Schristos
7ed4e6cd4Schristos# Some tweaks to the status line
8ed4e6cd4Schristosset -g status-right "%H:%M"
96483eba0Schristosset -g window-status-current-style "underscore"
10ed4e6cd4Schristos
114e179ddaSchristos# If running inside tmux ($TMUX is set), then change the status line to red
124e179ddaSchristos%if #{TMUX}
134e179ddaSchristosset -g status-bg red
144e179ddaSchristos%endif
154e179ddaSchristos
164e179ddaSchristos# Enable RGB colour if running in xterm(1)
17*f8cf1a91Swizset-option -sa terminal-features ",xterm*:RGB"
184e179ddaSchristos
194e179ddaSchristos# Change the default $TERM to tmux-256color
204e179ddaSchristosset -g default-terminal "tmux-256color"
214e179ddaSchristos
22ed4e6cd4Schristos# No bells at all
23ed4e6cd4Schristosset -g bell-action none
24ed4e6cd4Schristos
25ed4e6cd4Schristos# Keep windows around after they exit
26ed4e6cd4Schristosset -g remain-on-exit on
27ed4e6cd4Schristos
28ed4e6cd4Schristos# Change the prefix key to C-a
29ed4e6cd4Schristosset -g prefix C-a
30ed4e6cd4Schristosunbind C-b
31ed4e6cd4Schristosbind C-a send-prefix
32ed4e6cd4Schristos
33ed4e6cd4Schristos# Turn the mouse on, but without copy mode dragging
34ed4e6cd4Schristosset -g mouse on
35ed4e6cd4Schristosunbind -n MouseDrag1Pane
364e179ddaSchristosunbind -Tcopy-mode MouseDrag1Pane
37ed4e6cd4Schristos
38ed4e6cd4Schristos# Some extra key bindings to select higher numbered windows
39ed4e6cd4Schristosbind F1 selectw -t:10
40ed4e6cd4Schristosbind F2 selectw -t:11
41ed4e6cd4Schristosbind F3 selectw -t:12
42ed4e6cd4Schristosbind F4 selectw -t:13
43ed4e6cd4Schristosbind F5 selectw -t:14
44ed4e6cd4Schristosbind F6 selectw -t:15
45ed4e6cd4Schristosbind F7 selectw -t:16
46ed4e6cd4Schristosbind F8 selectw -t:17
47ed4e6cd4Schristosbind F9 selectw -t:18
48ed4e6cd4Schristosbind F10 selectw -t:19
49ed4e6cd4Schristosbind F11 selectw -t:20
50ed4e6cd4Schristosbind F12 selectw -t:21
51ed4e6cd4Schristos
52ef36e747Schristos# A key to toggle between smallest and largest sizes if a window is visible in
53ef36e747Schristos# multiple places
54ef36e747Schristosbind F set -w window-size
55ef36e747Schristos
56ef36e747Schristos# Keys to toggle monitoring activity in a window and the synchronize-panes option
57ed4e6cd4Schristosbind m set monitor-activity
58ed4e6cd4Schristosbind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
59ed4e6cd4Schristos
60ef36e747Schristos# Create a single default session - because a session is created here, tmux
614e179ddaSchristos# should be started with "tmux attach" rather than "tmux new"
62ed4e6cd4Schristosnew -d -s0 -nirssi 'exec irssi'
63ed4e6cd4Schristosset -t0:0 monitor-activity on
64ed4e6cd4Schristosset -t0:0 aggressive-resize on
65ed4e6cd4Schristosneww -d -ntodo 'exec emacs ~/TODO'
66ed4e6cd4Schristossetw -t0:1 aggressive-resize on
67ed4e6cd4Schristosneww -d -nmutt 'exec mutt'
68ed4e6cd4Schristossetw -t0:2 aggressive-resize on
69ed4e6cd4Schristosneww -d
70ed4e6cd4Schristosneww -d
71ed4e6cd4Schristosneww -d
72