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.

77 lines
1.3 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. # Mouse
  20. set -g mode-mouse on
  21. set -g mouse-resize-pane on
  22. set -g mouse-select-pane on
  23. set -g mouse-select-window on
  24. # Toggle mouse on with ^A m
  25. bind m \
  26. set -g mode-mouse on \;\
  27. set -g mouse-resize-pane on \;\
  28. set -g mouse-select-pane on \;\
  29. set -g mouse-select-window on \;\
  30. display 'Mouse: ON'
  31. # Toggle mouse off with ^A M
  32. bind M \
  33. set -g mode-mouse off \;\
  34. set -g mouse-resize-pane off \;\
  35. set -g mouse-select-pane off \;\
  36. set -g mouse-select-window off \;\
  37. display 'Mouse: OFF'
  38. # sessions
  39. #
  40. bind -r ( switch-client -p
  41. bind -r ) switch-client -n
  42. # windows
  43. #
  44. bind -r b select-window -t :-
  45. bind -r n select-window -t :+
  46. # panes
  47. #
  48. bind | split-window -h
  49. bind - split-window -v
  50. bind h select-pane -L
  51. bind j select-pane -D
  52. bind k select-pane -U
  53. bind l select-pane -R
  54. bind -r H resize-pane -L 5
  55. bind -r J resize-pane -D 5
  56. bind -r K resize-pane -U 5
  57. bind -r L resize-pane -R 5
  58. # buffers
  59. #
  60. bind = paste-buffer
  61. bind -t vi-copy 'v' begin-selection
  62. bind -t vi-copy 'y' copy-selection