# Silas S. Brown's .tmux.conf, 2013/2017/2021, public domain - no warranty # Where to find history: # on GitHub at https://github.com/ssb22/config # and on GitLab at https://gitlab.com/ssb22/config # and on BitBucket https://bitbucket.org/ssb22/config # and at https://gitlab.developers.cam.ac.uk/ssb22/config # and in China: https://gitee.com/ssb22/config # screen -D -R can be emulated with: # if ! test "$TERM" == screen; then tmux attach || tmux; exit; fi # (new tmux shells read .bash_profile not .bashrc, so the # 'if' is necessary to avoid recursion; you might also want # to check that $TERM is not "dumb" to avoid scp trouble) # Turn off the status line for more real-estate, like screen: set-option -g status off # You can temporarily turn status on/off from the command line, e.g.: # tmux set-option -g status on # tmux set-option -g status off # but it's usually easier to do the choose-window command # (C-a " in screen's keybindings). Anyway here are some # colours for it if you do turn it on: set-option -g status-style fg=brightwhite,bg=blue set-option -g window-status-style bg=blue set-option -g window-status-current-style bg=red set-option -g window-status-bell-style bg=black set-option -g window-status-activity-style bg=magenta set-option -g message-style bg=blue,fg=brightyellow set-option -g message-command-style bg=blue,fg=brightwhite # and these colours are for the choose-window command: set-option -g mode-style fg=brightwhite,bg=blue # If you have an old version of tmux (1.8 or below) then # comment out the above 'style' lines and uncomment these: # set-option -g status-fg brightwhite # set-option -g status-bg blue # set-option -g window-status-bg blue # set-option -g window-status-current-bg red # set-option -g window-status-bell-bg black # set-option -g window-status-activity-bg magenta # set-option -g mode-fg brightwhite # set-option -g mode-bg blue # set-option -g message-bg blue # set-option -g message-command-bg blue # set-option -g message-fg brightyellow # set-option -g message-command-fg brightwhite # (can also set window-status-.*-fg exceptions if desired) # and we also want more time to read messages etc: set-option -g escape-time 2000 set-option -g display-time 3000 set-option -g display-panes-time 2000 # Can do it from the command line: # tmux display-message "text here" # c.f. screen -X wall "text here" # Option removed in tmux 1.9 (Debian 8): # set-option -g default-path "." # ------------------------------------------------------ # The rest of this file is from Nicholas Marriott's # screen-keys.conf although I had to make some minor # changes to get it to work on the tmux in Debian unbind C-b set -g prefix ^A bind a send-prefix # Bind appropriate commands similar to screen. # lockscreen ^X x unbind ^X bind ^X lock-server unbind x bind x lock-server # screen ^C c unbind ^C bind ^C new-window unbind c bind c new-window # detach ^D d unbind ^D bind ^D detach # displays * unbind * bind * list-clients # next ^@ ^N sp n unbind ^@ bind ^@ next-window unbind ^N bind ^N next-window unbind " " bind " " next-window unbind n bind n next-window # title A unbind A bind A command-prompt "rename-window %%" # other ^A unbind ^A bind ^A last-window # prev ^H ^P p ^? unbind ^H bind ^H previous-window unbind ^P bind ^P previous-window unbind p bind p previous-window unbind BSpace bind BSpace previous-window # windows ^W w unbind ^W bind ^W list-windows unbind w bind w list-windows # kill K k unbind K bind K confirm-before "kill-window" unbind k bind k confirm-before "kill-window" # redisplay ^L l unbind ^L bind ^L refresh-client unbind l bind l refresh-client # split -v | unbind | bind | split-window # :kB: focus up unbind Tab bind Tab select-pane -t:.+ unbind BTab bind BTab select-pane -t:.- # " windowlist -b unbind '"' bind '"' choose-window