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.

84 lines
2.7 KiB

  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 /bin/zsh
  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-attr bright
  23. # default window title colors
  24. set-window-option -g window-status-fg white
  25. set-window-option -g window-status-bg default
  26. set-window-option -g window-status-attr dim
  27. # active window title colors
  28. set-window-option -g window-status-current-fg white
  29. set-window-option -g window-status-current-bg default
  30. set-window-option -g window-status-current-attr bright
  31. # command/message line colors
  32. set -g message-fg white
  33. set -g message-bg black
  34. set -g message-attr 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. # Split windows like Vim.
  55. bind v split-window -h
  56. bind h split-window -v
  57. # Plugins
  58. set -g @plugin 'tmux-plugins/tmux-battery'
  59. set -g @plugin 'tmux-plugins/tmux-yank'
  60. set -g @plugin 'tmux-plugins/tmux-sensible'
  61. set -g @plugin 'tmux-plugins/tmux-copycat'
  62. set -g @shell_mode 'vi'
  63. #source /home/igneo676/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
  64. source /home/igneo676/.tmux.powerline.conf
  65. run '~/.tmux/plugins/tpm/tpm'