This is a first dotfiles config. I think I have a lot more to add tho...
		
			
				
	
	
		
			27 lines
		
	
	
		
			736 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			736 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/sh
 | |
| 
 | |
| receptacle=$(bspc query -N -n ".leaf.!window.local" | awk NR==1)
 | |
| 
 | |
| window_promotion()
 | |
| {
 | |
| 	if [ -n "$receptacle" ] > /dev/null ; then
 | |
|     bspc node -n "$receptacle" 
 | |
|     elif [ -z "$(bspc query -N -n last.!automatic.local)" ]; then \
 | |
|         bspc node -s biggest.!focused.local; \
 | |
|     else \
 | |
|         bspc node -n last.!automatic.local; \
 | |
|     fi 
 | |
| }
 | |
| 
 | |
| if bspc query -N -n "@/.!automatic" > /dev/null ; then
 | |
| 	bspc node -n @/ || window_promotion
 | |
| 	else
 | |
|     	if [ -n "$receptacle" ] > /dev/null ; then
 | |
|     			bspc node -n "$receptacle" 
 | |
|     		elif [ -z "$(bspc query -N -n last.!automatic.local)" ]; then \
 | |
|        			 bspc node -s biggest.!focused.local; \
 | |
|     		else \
 | |
|        			 bspc node -n last.!automatic.local; \
 | |
|     	fi 
 | |
| fi
 |