tmux.conf.backup.20251026_165838 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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 'catppuccin/tmux#v0.2.0'
  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. # Catppuccin Theme Configuration
  84. set -g status-position top
  85. set -g @catppuccin_window_left_separator "█"
  86. set -g @catppuccin_window_right_separator "█"
  87. set -g @catppuccin_window_number_position "left"
  88. set -g @catppuccin_window_middle_separator "█ "
  89. set -g @catppuccin_window_default_fill "number"
  90. set -g @catppuccin_window_current_fill "number"
  91. set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(🔍),}"
  92. set -g @catppuccin_window_default_text "#W"
  93. # Determine status modules based on hostname
  94. run-shell "if [ $(hostname) = 'fw' ]; then \
  95. tmux set -g @catppuccin_status_modules_right 'date_time battery session'; \
  96. else \
  97. tmux set -g @catppuccin_status_modules_right 'date_time session'; \
  98. fi"
  99. set -g @catppuccin_status_left_separator ""
  100. set -g @catppuccin_status_right_separator " "
  101. set -g @catppuccin_status_right_separator_inverse "yes"
  102. set -g @catppuccin_status_fill "all"
  103. set -g @catppuccin_status_connect_separator "yes"
  104. set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M:%S"
  105. # Rose Pine Color Scheme
  106. set -g @catppuccin_pane_color "#1e1e2e"
  107. set -g @catppuccin_pane_background_color "#181825"
  108. set -g @catppuccin_window_current_color "#eb6f92"
  109. set -g @catppuccin_window_current_background_color "#f5e0dc"
  110. set -g @catppuccin_window_default_color "#ebbcba"
  111. set -g @catppuccin_window_default_background_color "#f5e0dc"
  112. set -g @catppuccin_session_color "#9ccfd8"
  113. set -g @catppuccin_session_background_color "#f5e0dc"
  114. set -g @catppuccin_directory_color "#c4a7e7"
  115. set -g @catppuccin_directory_background_color "#f5e0dc"
  116. set -g @catppuccin_date_time_color "#f6c177"
  117. set -g @catppuccin_date_time_background_color "#f5e0dc"
  118. # Battery Icons (Glyphs)
  119. set -g @batt_icon_charge_tier8 ''
  120. set -g @batt_icon_charge_tier7 ''
  121. set -g @batt_icon_charge_tier6 ''
  122. set -g @batt_icon_charge_tier5 ''
  123. set -g @batt_icon_charge_tier4 ''
  124. set -g @batt_icon_charge_tier3 ''
  125. set -g @batt_icon_charge_tier2 ''
  126. set -g @batt_icon_charge_tier1 ''
  127. # Plugin Manager
  128. set-environment -g TMUX_PLUGIN_MANAGER_PATH "$XDG_DATA_HOME/tmux/plugins"
  129. # Install TPM if not already installed
  130. if "test ! -d ~/.local/share/tmux/plugins/tpm" \
  131. "run 'git clone https://github.com/tmux-plugins/tpm ~/.local/share/tmux/plugins/tpm'"
  132. # Initialize TPM (keep this line at the very bottom of tmux.conf)
  133. run '~/.local/share/tmux/plugins/tpm/tpm'