Add scratchpad for spectrwm
This commit is contained in:
		
							parent
							
								
									b7bb393834
								
							
						
					
					
						commit
						ad214c1050
					
				
							
								
								
									
										17
									
								
								.bin/sp
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								.bin/sp
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
#!/bin/sh -x
 | 
			
		||||
 | 
			
		||||
# set the following quirk in .config/spectrwm/spectrwm.conf
 | 
			
		||||
# quirk[scratchpad] = FLOAT + ANYWHERE + FOCUSPREV
 | 
			
		||||
 | 
			
		||||
WID=$(wmctrl -x -l scratchpad | fgrep '.scratchpad' | cut -d" " -f1)
 | 
			
		||||
 | 
			
		||||
if [ -z "$WID" ]
 | 
			
		||||
then
 | 
			
		||||
   st -c scratchpad -g 128x38+250+150 &
 | 
			
		||||
else
 | 
			
		||||
    wmctrl -i -r $WID -b toggle,hidden
 | 
			
		||||
    if xwininfo -id 0x01800005 | fgrep -q IsViewable
 | 
			
		||||
    then
 | 
			
		||||
        wmctrl -i -R $WID
 | 
			
		||||
    fi
 | 
			
		||||
fi
 | 
			
		||||
@ -32,7 +32,7 @@ stack_mark_max             = ''
 | 
			
		||||
 | 
			
		||||
# Custom Quirks
 | 
			
		||||
quirk[IPMIView20-IPMIView20:IPMIView20-IPMIView20] = FLOAT + ANYWHERE
 | 
			
		||||
quirk[scratchpad] = FLOAT + ANYWHERE
 | 
			
		||||
quirk[scratchpad] = FLOAT + ANYWHERE + FOCUSPREV
 | 
			
		||||
quirk[Nsxiv:tabbed] = NOFOCUSONMAP + FOCUSPREV
 | 
			
		||||
 | 
			
		||||
# Window Manager Keys
 | 
			
		||||
@ -54,7 +54,7 @@ bind[exec]       = MOD+D
 | 
			
		||||
program[ssh]     = dexec_ssh
 | 
			
		||||
bind[ssh]        = MOD+S
 | 
			
		||||
 | 
			
		||||
program[scratchpad] = scratchpad
 | 
			
		||||
program[scratchpad] = sp
 | 
			
		||||
bind[scratchpad]    = MOD+minus
 | 
			
		||||
 | 
			
		||||
program[apps]    = dexec_apps
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user