Dotfiles for my tiling window manager + terminal workflow.
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.

67 lines
1.9 KiB

  1. # basic {{{
  2. # reload config file (change file location to your the tmux.conf you want to use)
  3. bind r source-file ~/.tmux.conf
  4. # prefix
  5. unbind C-b
  6. set-option -g prefix C-Space
  7. bind-key C-Space send-prefix
  8. # Enable mouse mode (tmux 2.1 and above)
  9. set -g mouse on
  10. # clear rename prompt
  11. bind-key , command-prompt "rename-window '%%'"
  12. # }}} #
  13. # panes{{{
  14. bind h split-window -h
  15. bind v split-window -v
  16. unbind '"'
  17. unbind %
  18. # vim-tmux-navigator{{{
  19. is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
  20. | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
  21. bind-key -n C-Left if-shell "$is_vim" "send-keys C-Left" "select-pane -L"
  22. bind-key -n C-Down if-shell "$is_vim" "send-keys C-Down" "select-pane -D"
  23. bind-key -n C-Up if-shell "$is_vim" "send-keys C-Up" "select-pane -U"
  24. bind-key -n C-Right if-shell "$is_vim" "send-keys C-Right" "select-pane -R"
  25. bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
  26. bind-key -T copy-mode-vi C-Left select-pane -L
  27. bind-key -T copy-mode-vi C-Down select-pane -D
  28. bind-key -T copy-mode-vi C-Up select-pane -U
  29. bind-key -T copy-mode-vi C-Right select-pane -R
  30. bind-key -T copy-mode-vi C-\ select-pane -l
  31. # bind-key -T copy-mode-vi M-h select-pane -L
  32. # bind-key -T copy-mode-vi M-j select-pane -D
  33. # bind-key -T copy-mode-vi M-k select-pane -U
  34. # bind-key -T copy-mode-vi M-l select-pane -R
  35. # bind-key -T copy-mode-vi M-\ select-pane -l
  36. # }}}
  37. # kill panes without confirmation
  38. bind-key x kill-pane
  39. bind-key & kill-window
  40. # switch panes using Alt-arrow without prefix
  41. # bind -n C-Down select-pane -D
  42. # bind -n C-Up select-pane -U
  43. # bind -n C-Left select-pane -L
  44. # bind -n C-l select-pane -R
  45. # }}}
  46. # plugins {{{
  47. set -g @plugin 'tmux-plugins/tpm'
  48. set -g @plugin 'tmux-plugins/tmux-sensible'
  49. set -g @plugin 'jimeh/tmux-themepack'
  50. set -g @themepack 'powerline/double/blue'
  51. set -g @plugin 'christoomey/vim-tmux-navigator'
  52. run -b '~/.tmux/plugins/tpm/tpm'
  53. # }}} plugins #