142 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			142 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								set -g default-terminal "screen-256color"
							 | 
						|||
| 
								 | 
							
								set -ga terminal-overrides ",xterm-256color*:Tc"
							 | 
						|||
| 
								 | 
							
								#set -g default-terminal "tmux-256color"
							 | 
						|||
| 
								 | 
							
								#set -ga terminal-overrides ",*256col*:Tc"
							 | 
						|||
| 
								 | 
							
								set -g prefix2 C-a												# Secondary prefix
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								unbind-key C-b														# free the original bind-key key
							 | 
						|||
| 
								 | 
							
								set-option -g prefix C-a									# setting the prefix from C-b to C-a
							 | 
						|||
| 
								 | 
							
								bind-key C-a send-prefix
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								set-option -g base-index 1								# window index will start with 1
							 | 
						|||
| 
								 | 
							
								set-window-option -g pane-base-index 1 		# pane index will start with 1
							 | 
						|||
| 
								 | 
							
								set-option -g renumber-windows on
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								bind-key | split-window -h -c "#{pane_current_path}" # allows you to open new pane with current path
							 | 
						|||
| 
								 | 
							
								bind-key _ split-window -v -c "#{pane_current_path}"
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# nvim like movement
							 | 
						|||
| 
								 | 
							
								bind-key -r h select-pane -L              # go left
							 | 
						|||
| 
								 | 
							
								bind-key -r j select-pane -D              # go down
							 | 
						|||
| 
								 | 
							
								bind-key -r l select-pane -R              # go right
							 | 
						|||
| 
								 | 
							
								bind-key -r k select-pane -U              # go up
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# kill pane without asking me to kill it!
							 | 
						|||
| 
								 | 
							
								unbind-key x               								# unbind-key “x” from it’s current job of “ask and then close”
							 | 
						|||
| 
								 | 
							
								bind-key x kill-pane       								# rebind-key it to just “close”
							 | 
						|||
| 
								 | 
							
								bind-key X kill-session                   # key combo for killing the entire session - <prefix> + shift + x
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# Window: Movements
							 | 
						|||
| 
								 | 
							
								bind-key L last-window
							 | 
						|||
| 
								 | 
							
								bind-key -r C-h select-window -t :-       # cycle through the windows for quick window selection
							 | 
						|||
| 
								 | 
							
								bind-key -r C-l select-window -t :+
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# The default key binding are Ctr+ Up/Down/Left/Right for one row movements , Alt + Up/Down/Left/Right for five row movements.
							 | 
						|||
| 
								 | 
							
								# Let's add one more to the set (Vim way)
							 | 
						|||
| 
								 | 
							
								# Vim Style
							 | 
						|||
| 
								 | 
							
								bind-key -r H resize-pane -L 2            # resize a pane two rows at a time.
							 | 
						|||
| 
								 | 
							
								bind-key -r J resize-pane -D 2
							 | 
						|||
| 
								 | 
							
								bind-key -r K resize-pane -U 2
							 | 
						|||
| 
								 | 
							
								bind-key -r L resize-pane -R 2
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# these settings are added for testing porpuses they were taken from the github-nvim-theme
							 | 
						|||
| 
								 | 
							
								# Undercurl
							 | 
						|||
| 
								 | 
							
								set -g default-terminal "${TERM}"
							 | 
						|||
| 
								 | 
							
								set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
							 | 
						|||
| 
								 | 
							
								set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# toggle mouse
							 | 
						|||
| 
								 | 
							
								set -g mouse on
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# tpm plugins
							 | 
						|||
| 
								 | 
							
								#set -g @plugin 'egel/tmux-gruvbox'
							 | 
						|||
| 
								 | 
							
								#set -g @tmux-gruvbox 'dark' # or 'light'
							 | 
						|||
| 
								 | 
							
								set -g @plugin 'tmux-plugins/tmux-yank'
							 | 
						|||
| 
								 | 
							
								set -g @plugin 'tmux-plugins/tmux-resurrect'
							 | 
						|||
| 
								 | 
							
								set -g @plugin 'wfxr/tmux-fzf-url'
							 | 
						|||
| 
								 | 
							
								#set -g @plugin "arcticicestudio/nord-tmux"
							 | 
						|||
| 
								 | 
							
								#set -g @plugin 'odedlaz/tmux-onedark-theme'
							 | 
						|||
| 
								 | 
							
								#set -g @plugin 'jimeh/tmux-themepack'
							 | 
						|||
| 
								 | 
							
								#set -g @plugin 'srcery-colors/srcery-tmux'
							 | 
						|||
| 
								 | 
							
								# Official catppuccino theme
							 | 
						|||
| 
								 | 
							
								# ...alongside
							 | 
						|||
| 
								 | 
							
								set -g @plugin 'tmux-plugins/tpm'
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								#set -g @catppuccin_flavour 'macchiato' #'latte' # or frappe, macchiato, mocha
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# this plugin is pretty cool but it does not work without Powerline fonts
							 | 
						|||
| 
								 | 
							
								#set -g @plugin 'Determinant/tmux-colortag'
							 | 
						|||
| 
								 | 
							
								#TMUX_COLORTAG_USE_POWERLINE=yes
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# sets specific tmux theme
							 | 
						|||
| 
								 | 
							
								#set -g @themepack 'powerline/default/green'
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
							 | 
						|||
| 
								 | 
							
								set -g @plugin 'tmux-plugins/tmux-net-speed'
							 | 
						|||
| 
								 | 
							
								#set -g @plugin 'samoshkin/tmux-plugin-sysstat' # `sysstat_ntemp` and `sysstat_itemp` are temperatures of nvidia card and intel card, these scripts are available in my fork: https://github.com/sainnhe/tmux-plugin-sysstat
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								#source ~/.config/tmux/themes/Catppuccin.conf
							 | 
						|||
| 
								 | 
							
								#source ~/.config/tmux/themes/sonokai-shusia.tmux.conf
							 | 
						|||
| 
								 | 
							
								#source ~/.config/tmux/themes/nightfox.conf
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# Initialize TMUX plugin manager (keep this line at the very bottom of the tmux.conf"
							 | 
						|||
| 
								 | 
							
								run '~/.tmux/plugins/tpm/tpm'
							 | 
						|||
| 
								 | 
							
								# Color key:
							 | 
						|||
| 
								 | 
							
								#   #2d2d2d Background
							 | 
						|||
| 
								 | 
							
								#   #393939 Current Line
							 | 
						|||
| 
								 | 
							
								#   #515151 Selection
							 | 
						|||
| 
								 | 
							
								#   #cccccc Foreground
							 | 
						|||
| 
								 | 
							
								#   #999999 Comment
							 | 
						|||
| 
								 | 
							
								#   #f2777a Red
							 | 
						|||
| 
								 | 
							
								#   #f99157 Orange
							 | 
						|||
| 
								 | 
							
								#   #ffcc66 Yellow
							 | 
						|||
| 
								 | 
							
								#   #99cc99 Green
							 | 
						|||
| 
								 | 
							
								#   #66cccc Aqua
							 | 
						|||
| 
								 | 
							
								#   #6699cc Blue
							 | 
						|||
| 
								 | 
							
								#   #cc99cc Purple
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								############################
							 | 
						|||
| 
								 | 
							
								## Status Bar
							 | 
						|||
| 
								 | 
							
								############################
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# enable UTF-8 support in status bar
							 | 
						|||
| 
								 | 
							
								set -gq status-utf8 on
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# set refresh interval for status bar
							 | 
						|||
| 
								 | 
							
								set -g status-interval 30
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# center the status bar
							 | 
						|||
| 
								 | 
							
								set -g status-justify centre
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# show session, window, pane in left status bar
							 | 
						|||
| 
								 | 
							
								set -g status-left-length 40
							 | 
						|||
| 
								 | 
							
								set -g status-left '#[fg=green] #S #[fg=yellow]#I/#[fg=cyan]#P '
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# show hostname, date, tim 100
							 | 
						|||
| 
								 | 
							
								set -g status-right '#(battery -t) #[fg=cyan] %d %b %R '
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# update status bar info
							 | 
						|||
| 
								 | 
							
								set -g status-interval 60
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								###########################
							 | 
						|||
| 
								 | 
							
								# Colors
							 | 
						|||
| 
								 | 
							
								###########################
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# color status bar
							 | 
						|||
| 
								 | 
							
								set -g status-style fg=white,bg=colour235
							 | 
						|||
| 
								 | 
							
								# color of message bar
							 | 
						|||
| 
								 | 
							
								set -g message-style fg=white,bold,bg=green
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# highlight current window
							 | 
						|||
| 
								 | 
							
								setw -g window-status-style fg=cyan,bg=colour235
							 | 
						|||
| 
								 | 
							
								setw -g window-status-current-style fg=white,bold,bg=red
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# set color of active pane
							 | 
						|||
| 
								 | 
							
								set -g pane-border-style fg=colour240,bg=black
							 | 
						|||
| 
								 | 
							
								set -g pane-active-border-style fg=green,bg=black
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# dim non active panes (don't like it much)
							 | 
						|||
| 
								 | 
							
								# setw -g window-style fg=colour240,bg=colour235
							 | 
						|||
| 
								 | 
							
								# setw -g window-active-style fg=white,bg=black
							 |