Advertisement
tjh

Decent TMux rc (.tmux.conf) file

tjh
Aug 21st, 2011
978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. #
  2. # By Nicholas Marriott. Public domain.
  3. #
  4. # This configuration file binds many of the common GNU screen key bindings to
  5. # appropriate tmux key bindings. Note that for some key bindings there is no
  6. # tmux analogue and also that this set omits binding some commands available in
  7. # tmux but not in screen.
  8. #
  9. # Note this is only a selection of key bindings and they are in addition to the
  10. # normal tmux key bindings. This is intended as an example not as to be used
  11. # as-is.
  12.  
  13. set -g default-terminal "screen-256color"
  14.  
  15. set-option -g status-bg default
  16. set-option -g status-fg black
  17. set-option -g message-bg yellow
  18. set-option -g message-fg black
  19. set-option -g history-limit 32768
  20.  
  21. # Set the prefix to ^A.
  22. unbind C-b
  23. set -g prefix ^A
  24. bind a send-prefix
  25.  
  26. # Bind appropriate commands similar to screen.
  27. # lockscreen ^X x
  28. unbind ^X
  29. bind ^X lock-server
  30. unbind x
  31. bind x lock-server
  32.  
  33. # screen ^C c
  34. unbind ^C
  35. bind ^C new-window
  36. bind c
  37. bind c new-window
  38.  
  39. # detach ^D d
  40. unbind ^D
  41. bind ^D detach
  42.  
  43. # displays *
  44. unbind *
  45. bind * list-clients
  46.  
  47. # next ^@ ^N sp n
  48. unbind ^@
  49. bind ^@ next-window
  50. unbind ^N
  51. bind ^N next-window
  52. unbind " "
  53. bind " " next-window
  54. unbind n
  55. bind n next-window
  56.  
  57. # title A
  58. unbind A
  59. bind A command-prompt "rename-window %%"
  60.  
  61. # other ^A
  62. unbind ^A
  63. bind ^A last-window
  64. # prev ^H ^P p ^?
  65. unbind ^H
  66. bind ^H previous-window
  67. unbind ^P
  68. bind ^P previous-window
  69. unbind p
  70. bind p previous-window
  71. unbind BSpace
  72. bind BSpace previous-window
  73.  
  74. # windows ^W w
  75. unbind ^W
  76. bind ^W list-windows
  77. unbind w
  78. bind w list-windows
  79.  
  80. # quit \
  81. unbind \
  82. bind \ confirm-before "kill-server"
  83.  
  84. # kill K k
  85. unbind K
  86. bind K confirm-before "kill-window"
  87. unbind k
  88. bind k confirm-before "kill-window"
  89.  
  90. # redisplay ^L l
  91. unbind ^L
  92. bind ^L refresh-client
  93. unbind l
  94. bind l refresh-client
  95.  
  96. # split -v |
  97. unbind |
  98. bind | split-window
  99.  
  100. # :kB: focus up
  101. #unbind Tab
  102. #bind Tab down-pane
  103. #unbind BTab
  104. #bind BTab up-pane
  105.  
  106. # " windowlist -b
  107. unbind '"'
  108. bind '"' choose-window
  109.  
  110.  
  111. set -g status-bg black
  112. set -g status-fg white
  113. set-window-option -g window-status-current-bg red
  114. set -g status-left '#[fg=green]#H'
  115. set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 2-)'
  116. setw -g automatic-rename
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement