Advertisement
VladNitu

tmux conf vlad

Jun 4th, 2024
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. # Remap C-b to C-a
  2. unbind C-b
  3. set-option -g prefix C-a
  4. bind-key C-a send-prefix
  5.  
  6. # split panes using | for vertical and - for horizontal
  7. bind | split-window -h
  8. bind - split-window -v
  9. unbind '"'
  10. unbind %
  11.  
  12. # don't rename windows automatically
  13. set-option -g allow-rename off
  14.  
  15. # Enable mouse scrolling
  16. set -g mouse on
  17.  
  18. # macOS only - Allow copying/pasting from clipboard
  19. # Resource: https://unix.stackexchange.com/questions/318281/how-to-copy-and-paste-with-a-mouse-with-tmux
  20. set -g mouse on
  21. bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
  22. bind -n WheelDownPane select-pane -t= \; send-keys -M
  23. bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
  24. bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
  25. bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
  26. bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
  27. bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
  28.  
  29. # To copy, left click and drag to highlight text in yellow,
  30. # once you release left click yellow text will disappear and will automatically be available in clibboard
  31. # # Use vim keybindings in copy mode
  32. setw -g mode-keys vi
  33. # Update default binding of `Enter` to also use copy-pipe
  34. unbind -T copy-mode-vi Enter
  35. bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
  36. bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
  37.  
  38. # List of plugins
  39. set -g @plugin 'tmux-plugins/tpm'
  40. set -g @plugin 'tmux-plugins/tmux-sensible'
  41. set -g @plugin 'dracula/tmux'
  42. set -g @dracula-show-powerline true
  43. set -g @dracula-show-left-icon smiley
  44. set -g @dracula-show-fahrenheit false
  45. set -g @dracula-border-contrast true
  46. set -g @dracula-plugins "git battery time cpu-usage"
  47.  
  48.  
  49.  
  50. set -g default-terminal screen-256color
  51.  
  52.  
  53.  
  54. # Other examples:
  55. # set -g @plugin 'github_username/plugin_name'
  56. # set -g @plugin 'github_username/plugin_name#branch'
  57. # set -g @plugin 'git@github.com:user/plugin'
  58. # set -g @plugin 'git@bitbucket.com:user/plugin'
  59.  
  60. # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
  61. run '~/.tmux/plugins/tpm/tpm'
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement