tmux.conf.backup.20251027_115806 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # ==============================================
  2. # === TMUX Configuration ===
  3. # ==============================================
  4. # General Settings
  5. # ----------------
  6. set -g prefix C-a # Use CTRL+a as our tmux command prefix
  7. unbind C-b # Unbind default prefix
  8. set -g base-index 1 # Start windows numbering at 1
  9. setw -g pane-base-index 1 # Start pane numbering at 1
  10. set -g renumber-windows on # Renumber windows when a window is closed
  11. set -s escape-time 1 # Lower the default tmux delay
  12. set -g mouse on # Enable mouse support
  13. setw -g aggressive-resize on # Only resize screen if smaller screen is active
  14. set -g history-limit 10000 # Store 10k lines of history
  15. set-option -g allow-rename off # Disable automatic window renaming
  16. set-option -s set-clipboard on # Enable clipboard support
  17. setw -g mode-keys vi # Use vi keys in copy mode
  18. # Key Bindings
  19. # ------------
  20. bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf \; display "tmux reloaded!" # Reload config
  21. bind v split-window -h -c "#{pane_current_path}" # Split vertically
  22. bind s split-window -v -c "#{pane_current_path}" # Split horizontally
  23. # Vim-like pane navigation
  24. bind h select-pane -L
  25. bind j select-pane -D
  26. bind k select-pane -U
  27. bind l select-pane -R
  28. # Vim-like pane resizing
  29. bind -r H resize-pane -L 5
  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. # Vim-like copy mode navigation
  34. bind-key -T copy-mode-vi h send-keys -X cursor-left
  35. bind-key -T copy-mode-vi j send-keys -X cursor-down
  36. bind-key -T copy-mode-vi k send-keys -X cursor-up
  37. bind-key -T copy-mode-vi l send-keys -X cursor-right
  38. bind-key -T copy-mode-vi w send-keys -X next-word
  39. bind-key -T copy-mode-vi b send-keys -X previous-word
  40. bind-key -T copy-mode-vi 0 send-keys -X start-of-line
  41. bind-key -T copy-mode-vi $ send-keys -X end-of-line
  42. bind-key -T copy-mode-vi G send-keys -X history-bottom
  43. bind-key -T copy-mode-vi g send-keys -X history-top
  44. bind-key -T copy-mode-vi / command-prompt -T search -I "#{pane_current_path}" "send -X search-forward \"%%\""
  45. bind-key -T copy-mode-vi ? command-prompt -T search -I "#{pane_current_path}" "send -X search-backward \"%%\""
  46. bind-key -T copy-mode-vi n send-keys -X search-again
  47. bind-key -T copy-mode-vi N send-keys -X search-reverse
  48. bind-key -T copy-mode-vi v send-keys -X begin-selection
  49. bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
  50. bind-key -T copy-mode-vi Escape send-keys -X cancel
  51. # Move pane to a different window
  52. bind-key m choose-window -F "#{window_index}: #{window_name}" "join-pane -h -t %%"
  53. bind-key M choose-window -F "#{window_index}: #{window_name}" "join-pane -v -t %%"
  54. # Visual Settings
  55. # ---------------
  56. set -g status-interval 2
  57. set-option -g visual-activity off
  58. set-option -g visual-bell off
  59. set-option -g visual-silence off
  60. set-window-option -g monitor-activity off
  61. set-option -g bell-action none
  62. # Terminal Settings
  63. # -----------------
  64. set -gq allow-passthrough on
  65. set -g visual-activity off
  66. set -ga update-environment TERM
  67. set -ga update-environment TERM_PROGRAM
  68. set -g default-terminal "tmux-256color"
  69. set -g terminal-overrides ',xterm-256color:Tc'
  70. # Plugins
  71. # -------
  72. set -g @plugin 'tmux-plugins/tpm'
  73. set -g @plugin 'tmux-plugins/tmux-sensible'
  74. set -g @plugin 'tmux-plugins/tmux-yank'
  75. set -g @plugin 'rose-pine/tmux'
  76. set -g @plugin 'tmux-plugins/tmux-battery' # Re-enabled with our fixes
  77. set -g @plugin 'MaximilianGaedig/tmux-filter'
  78. # Plugin Settings
  79. # ---------------
  80. set -g @yank_selection_mouse 'clipboard'
  81. set -g @yank_selection 'clipboard'
  82. set -g @yank_action 'copy-pipe' # or 'copy-pipe-and-cancel' for the default
  83. # Rosé Pine Theme Configuration
  84. # -----------------------------
  85. set -g status-position top
  86. set -g @rose_pine_variant 'main' # Options are 'main', 'moon' or 'dawn'
  87. # Enable extra modules
  88. set -g @rose_pine_host 'on' # Enables hostname in the status bar
  89. set -g @rose_pine_hostname_short 'on' # Makes the hostname shorter by using tmux's '#h' format
  90. set -g @rose_pine_date_time '%Y-%m-%d %H:%M:%S' # Date/time format
  91. set -g @rose_pine_user 'on' # Turn on the username component in the statusbar
  92. set -g @rose_pine_directory 'on' # Turn on the current folder component in the status bar
  93. set -g @rose_pine_bar_bg_disable 'on' # Disables background color, for transparent terminal emulators
  94. # Battery module - determine if battery is available
  95. run-shell "if [ -d /sys/class/power_supply/BAT* ]; then \
  96. tmux set -g @rose_pine_status_right_append_section '#{tmux_battery_status_bg}'; \
  97. fi"
  98. # Battery Icons (Glyphs)
  99. set -g @batt_icon_charge_tier8 ''
  100. set -g @batt_icon_charge_tier7 ''
  101. set -g @batt_icon_charge_tier6 ''
  102. set -g @batt_icon_charge_tier5 ''
  103. set -g @batt_icon_charge_tier4 ''
  104. set -g @batt_icon_charge_tier3 ''
  105. set -g @batt_icon_charge_tier2 ''
  106. set -g @batt_icon_charge_tier1 ''
  107. # Optional customization options
  108. # set -g @rose_pine_left_separator ' > '
  109. # set -g @rose_pine_right_separator ' < '
  110. # set -g @rose_pine_field_separator ' | '
  111. set -g @rose_pine_window_separator ' #{?window_zoomed_flag, ,}' # Replaces the default `:` between the window number and name
  112. # Plugin Manager
  113. set-environment -g TMUX_PLUGIN_MANAGER_PATH "$XDG_DATA_HOME/tmux/plugins"
  114. # Install TPM if not already installed
  115. if "test ! -d ~/.local/share/tmux/plugins/tpm" \
  116. "run 'git clone https://github.com/tmux-plugins/tpm ~/.local/share/tmux/plugins/tpm'"
  117. # Initialize TPM (keep this line at the very bottom of tmux.conf)
  118. run '~/.local/share/tmux/plugins/tpm/tpm'