You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.1 KiB

  1. # same prefix as `screen`
  2. set -g prefix C-a
  3. unbind C-b
  4. # 0-indexed is not keyboard friendly
  5. set -g base-index 1
  6. set -g pane-base-index 1
  7. # misc features
  8. set -s escape-time 1
  9. setw -g mode-keys vi
  10. # reload
  11. bind r source-file ~/.tmux.conf \; display "Reloaded!"
  12. # send C-a
  13. bind C-a send-prefix
  14. # status bar
  15. #
  16. set -g status-utf8 on
  17. set -g monitor-activity on
  18. set -g visual-activity on
  19. # Toggle mouse on with ^A m
  20. bind m \
  21. set -g mode-mouse on \;\
  22. set -g mouse-resize-pane on \;\
  23. set -g mouse-select-pane on \;\
  24. set -g mouse-select-window on \;\
  25. display 'Mouse: ON'
  26. # Toggle mouse off with ^A M
  27. bind M \
  28. set -g mode-mouse off \;\
  29. set -g mouse-resize-pane off \;\
  30. set -g mouse-select-pane off \;\
  31. set -g mouse-select-window off \;\
  32. display 'Mouse: OFF'
  33. # sessions
  34. #
  35. bind -r ( switch-client -p
  36. bind -r ) switch-client -n
  37. # windows
  38. #
  39. bind -r b select-window -t :-
  40. bind -r n select-window -t :+
  41. # panes
  42. #
  43. bind | split-window -h -c "#{pane_current_path}"
  44. bind - split-window -v -c "#{pane_current_path}"
  45. bind h select-pane -L
  46. bind j select-pane -D
  47. bind k select-pane -U
  48. bind l select-pane -R
  49. bind -r H resize-pane -L 5
  50. bind -r J resize-pane -D 5
  51. bind -r K resize-pane -U 5
  52. bind -r L resize-pane -R 5
  53. # buffers
  54. #
  55. bind = paste-buffer
  56. bind -t vi-copy 'v' begin-selection
  57. bind -t vi-copy 'y' copy-selection
  58. # clear scroll
  59. #
  60. bind k send-keys -R \; clear-history
  61. # http://stahlke.org/dan/tmux-nested/
  62. set -g status-bg colour40
  63. setw -g window-status-current-bg colour40
  64. bind -n C-t new-window -a
  65. bind -n S-left prev
  66. bind -n S-right next
  67. bind -n S-C-left swap-window -t -1
  68. bind -n S-C-right swap-window -t +1
  69. bind -n M-F11 set -qg status-bg colour25
  70. bind -n M-F12 set -qg status-bg colour40
  71. bind -n S-up \
  72. send-keys M-F12 \; \
  73. set -qg status-bg colour25 \; \
  74. unbind -n S-left \; \
  75. unbind -n S-right \; \
  76. unbind -n S-C-left \; \
  77. unbind -n S-C-right \; \
  78. unbind -n C-t \; \
  79. set -qg prefix C-b
  80. bind -n S-down \
  81. send-keys M-F11 \; \
  82. set -qg status-bg colour40 \; \
  83. bind -n S-left prev \; \
  84. bind -n S-right next \; \
  85. bind -n S-C-left swap-window -t -1 \; \
  86. bind -n S-C-right swap-window -t +1 \; \
  87. bind -n C-t new-window -a -c "#{pane_current_path}" \; \
  88. set -qg prefix C-a