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.

90 lines
2.8 KiB

4 years ago
  1. set-option -g status-position top
  2. bind-key b set-option status
  3. set -g focus-events on
  4. set -g aggressive-resize on
  5. set -s escape-time 0
  6. set -g prefix C-b
  7. set-option -g default-shell /usr/bin/fish
  8. set-option -ga terminal-overrides ",*:Tc"
  9. set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
  10. set-window-option -g mode-keys vi
  11. bind-key -Tcopy-mode-vi 'v' send -X begin-selection
  12. bind-key -Tcopy-mode-vi 'y' send -X copy-selection
  13. bind -n S-left prev
  14. bind -n S-right next
  15. set -g status-interval 1
  16. set -g status-justify centre # center align window list
  17. set -g status-right ''
  18. set -g status-left ''
  19. # default statusbar colors
  20. set -g status-fg white
  21. set -g status-bg default
  22. set -g status-style bright
  23. # default window title colors
  24. set-window-option -g window-status-style fg=white
  25. set-window-option -g window-status-style bg=default
  26. set-window-option -g window-status-style dim
  27. # active window title colors
  28. set-window-option -g window-status-current-style fg=white
  29. set-window-option -g window-status-current-style bg=default
  30. set-window-option -g window-status-current-style bright
  31. # command/message line colors
  32. set -g message-style fg=white
  33. set -g message-style bg=black
  34. set -g message-style bright
  35. set-option -gw xterm-keys on
  36. set-window-option -g xterm-keys on
  37. setw -g mouse on
  38. bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
  39. bind-key -Tcopy-mode-vi PPage send -X page-up
  40. bind-key -Tcopy-mode-vi NPage send -X page-down
  41. set-option -g base-index 1
  42. set-window-option -g pane-base-index 1
  43. bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
  44. bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
  45. bind-key -Tcopy-mode-vi WheelUpPane send -X halfpage-up
  46. bind-key -Tcopy-mode-vi WheelDownPane send -X halfpage-down
  47. # Smart pane switching with awareness of vim splits
  48. is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
  49. bind -n M-Left if-shell "$is_vim" "send-keys M-Left" "select-pane -L"
  50. bind -n M-Down if-shell "$is_vim" "send-keys M-Down" "select-pane -D"
  51. bind -n M-Up if-shell "$is_vim" "send-keys M-Up" "select-pane -U"
  52. bind -n M-Right if-shell "$is_vim" "send-keys M-Right" "select-pane -R"
  53. #bind -n M-\ if-shell "$is_vim" "send-keys M-\\" "select-pane -l"
  54. # quick pane cycling
  55. unbind ^B
  56. bind ^B select-pane -t :.+
  57. # Split windows like Vim.
  58. bind v split-window -h
  59. bind h split-window -v
  60. # Plugins
  61. set -g @plugin 'tmux/tpm'
  62. set -g @plugin 'tmux-plugins/tmux-battery'
  63. set -g @plugin 'tmux-plugins/tmux-yank'
  64. set -g @plugin 'tmux-plugins/tmux-sensible'
  65. set -g @plugin 'tmux-plugins/tmux-copycat'
  66. set -g @shell_mode 'vi'
  67. set -g @plugin 'jimeh/tmux-themepack'
  68. set -g @themepack 'powerline/block/cyan'
  69. source "${HOME}/.tmux.powerline.conf"
  70. run '~/.tmux/plugins/tpm/tpm'