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.

116 lines
3.9 KiB

  1. # set -g default-terminal "screen-256color"
  2. set-option -sa terminal-overrides ",xterm*:Tc"
  3. # easy reload config
  4. bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
  5. set-option -g status-position top
  6. # set window split
  7. bind v split-window -h -c "#{pane_current_path}"
  8. bind b split-window -v -c "#{pane_current_path}"
  9. # C-b is not acceptable -- Vim uses it
  10. set-option -g prefix C-a
  11. bind-key C-a last-window
  12. # Start numbering at 1
  13. set -g base-index 1
  14. # Allows for faster key repetition
  15. set -s escape-time 50
  16. # Rather than constraining window size to the maximum size of any client
  17. # connected to the *session*, constrain window size to the maximum size of any
  18. # client connected to *that window*. Much more reasonable.
  19. setw -g aggressive-resize on
  20. is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
  21. bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' { if -F '#{pane_at_left}' '' 'select-pane -L' }
  22. bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' { if -F '#{pane_at_bottom}' '' 'select-pane -D' }
  23. bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' { if -F '#{pane_at_top}' '' 'select-pane -U' }
  24. bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' { if -F '#{pane_at_right}' '' 'select-pane -R' }
  25. bind-key -T copy-mode-vi 'C-h' if -F '#{pane_at_left}' '' 'select-pane -L'
  26. bind-key -T copy-mode-vi 'C-j' if -F '#{pane_at_bottom}' '' 'select-pane -D'
  27. bind-key -T copy-mode-vi 'C-k' if -F '#{pane_at_top}' '' 'select-pane -U'
  28. bind-key -T copy-mode-vi 'C-l' if -F '#{pane_at_right}' '' 'select-pane -R'
  29. bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
  30. bind -r j resize-pane -D 5
  31. bind -r k resize-pane -U 5
  32. bind -r l resize-pane -R 5
  33. bind -r h resize-pane -L 5
  34. set-window-option -g mode-keys vi
  35. bind-key -T copy-mode-vi 'v' send -X begin-selection
  36. bind-key -T copy-mode-vi 'y' send -X copy-selection
  37. bind 'V' copy-mode
  38. # Enable mouse control (clickable windows, panes, resizable panes)
  39. set -g mouse on
  40. unbind -T copy-mode-vi MouseDragEnd1Pane
  41. bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
  42. bind K confirm kill-session
  43. bind-key -r f run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
  44. # Flow colorscheme | Tmux
  45. # https://github.com/0xstepit/flow.nvim
  46. ## Statusbar style
  47. set -g status-position top
  48. set -g status-right-length "100"
  49. set -g status-left-length "100"
  50. set -g status-style bg=#141A1F,fg=#3D4F5C
  51. set -g window-status-style fg=#3D4F5C,bg=#141A1F
  52. setw -g window-status-separator " "
  53. set -g window-status-current-style fg=colour198
  54. set -g window-status-format "(#I) #W"
  55. set -g window-status-current-format "(#I) #W"
  56. set -g status-left "#[fg=#0D0D0D,bg=#75BDF0] #S #[bg=#3D4F5C,fg=#75BDF0] #h #[bg=#141A1F] "
  57. set -g status-right "#[bg=#3D4F5C,fg=#75BDF0] %H:%M #[fg=#0D0D0D,bg=#75BDF0] %A %d. %b %Y "
  58. set -g message-command-style fg=#FF007C
  59. set -g message-style "fg=#FF007C, bg=#141A1F" # color used in the message popup.
  60. set -g mode-style "fg=#FF007C"
  61. ## Borders
  62. set -g pane-border-style "fg=#3D4F5C"
  63. set -g pane-active-border-style "fg=#3D4F5C"
  64. # Set below the rest of your config
  65. # ...
  66. # List of plugins
  67. set -g @plugin 'tmux-plugins/tpm'
  68. set -g @plugin 'tmux-plugins/tmux-sensible'
  69. # set -g @plugin "janoamaral/tokyo-night-tmux"
  70. # set -g @tokyo-night-tmux_window_id_style digital
  71. # set -g @plugin 'Nybkox/tmux-kanagawa'
  72. # set -g @kanagawa-show-powerline true
  73. # set -g @kanagawa-theme 'wave'
  74. # set -g @plugin 'jibingeo/tmux-colors-ayu'
  75. # set -g @plugin 'egel/tmux-gruvbox'
  76. # set -g @tmux-gruvbox 'dark' # or 'light'
  77. # set -g @plugin 'catppuccin/tmux'
  78. # set -g @catppuccin_flavour 'mocha'
  79. # set -g @catppuccin_status_left_separator ""
  80. # set -g @catppuccin_window_middle_separator " "
  81. # set -g @catppuccin_status_modules_right "application session directory date_time"
  82. # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
  83. run '~/.tmux/plugins/tpm/tpm'