92 lines
		
	
	
	
		
			2.6 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			92 lines
		
	
	
	
		
			2.6 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| # Allow cursor passthrough
 | |
| set -g allow-passthrough on
 | |
| 
 | |
| # Custom Prefix
 | |
| set -g prefix C-space
 | |
| bind-key C-space send-prefix
 | |
| 
 | |
| # Shortcut to custom hints
 | |
| bind h run-shell "tmux popup -xC -yC -w50% -h75% 'cat ~/.config/tmux/hints'"
 | |
| 
 | |
| # Shortcut to sync panes
 | |
| bind C-x setw synchronize-panes
 | |
| 
 | |
| # Shortcut to respawn panw
 | |
| bind M-r respawn-pane -k
 | |
| 
 | |
| # Mouse Scrolling
 | |
| set -g mouse on
 | |
| 
 | |
| # Mouse Copy
 | |
| bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "xclip"\; display "Copied"
 | |
| bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "xclip"\; display "Copied"
 | |
| 
 | |
| # Split
 | |
| bind S-down split-window -v -c "#{pane_current_path}"
 | |
| bind S-right split-window -h -c "#{pane_current_path}"
 | |
| 
 | |
| bind J split-window -v -c "#{pane_current_path}"
 | |
| bind L split-window -h -c "#{pane_current_path}"
 | |
| 
 | |
| # Override new window
 | |
| bind c new-window -c "~/"
 | |
| 
 | |
| # Navigation
 | |
| bind -n C-Left select-pane -L
 | |
| bind -n C-Right select-pane -R
 | |
| bind -n C-Up select-pane -U
 | |
| bind -n C-Down select-pane -D
 | |
| 
 | |
| 
 | |
| bind -n M-h select-pane -L
 | |
| bind -n M-j select-pane -D
 | |
| bind -n M-k select-pane -U
 | |
| bind -n M-l select-pane -R
 | |
| 
 | |
| bind -n C-S-Left previous-window
 | |
| bind -n C-S-Right next-window
 | |
| 
 | |
| bind -n M-H previous-window
 | |
| bind -n M-L next-window
 | |
| 
 | |
| # Config
 | |
| bind R source-file ~/.config/tmux/tmux.conf \; display "Config reloaded!"
 | |
| 
 | |
| # Colors
 | |
| set -g default-terminal "screen-256color"
 | |
| set -g pane-border-style fg='#008b8b'
 | |
| set -g pane-active-border-style fg='#34E2E2'
 | |
| 
 | |
| set -g message-style bg='#222222',fg='#34E2E2'
 | |
| set -g status-style bg='#222222',fg='#AD7FA8'
 | |
| 
 | |
| # Status
 | |
| set -g status-left '#{?client_prefix,#[fg=#008b8b]█, }'
 | |
| set -g status-right '#[fg=#ad7fa8]| #S | #(hostname -I | cut -d" " -f1) | %Y-%m-%d %H:%M '
 | |
| set -g status-right-length 50
 | |
| set -g status-interval 1
 | |
| set-window-option -g window-status-style fg='#008b8b',bg=default
 | |
| set-window-option -g window-status-current-style fg='#222222',bg='#ad7fa8'
 | |
| 
 | |
| # Persist Between Reboots
 | |
| set -g @plugin 'tmux-plugins/tmux-resurrect'
 | |
| set -g @plugin 'tmux-plugins/tmux-continuum'
 | |
| set -g @continuum-restore 'on'
 | |
| set -g @continuum-boot 'on'
 | |
| set -g @continuum-save-interval '10'  # Save every n minutes
 | |
| set -g @resurrect-capture-pane-contents 'on'
 | |
| set -g @resurrect-processes '"~autossh->autossh *" ssh nano k9s nvim'
 | |
| 
 | |
| # Open Links
 | |
| set -g @plugin 'tmux-plugins/tmux-open'
 | |
| set -g @open-S 'https://search.brave.com/search?q='
 | |
| 
 | |
| # Integrate with nvim navigation
 | |
| set -g @plugin 'christoomey/vim-tmux-navigator'
 | |
| set -g @vim_navigator_mapping_left "M-h"  #C-Left" # C-h"
 | |
| set -g @vim_navigator_mapping_right "M-l"  #C-Right" # C-l"
 | |
| set -g @vim_navigator_mapping_up "M-k"  #C-Up" # C-k"
 | |
| set -g @vim_navigator_mapping_down "M-j"  #C-Down" # C-j"
 | |
| 
 | |
| # Load Plugins
 | |
| run '~/.tmux/plugins/tpm/tpm'
 |