15 lines
		
	
	
		
			271 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			271 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
# Select a region and record it.
 | 
						|
 | 
						|
read -r X Y W H G ID < <(slop -f "%x %y %w %h %g %i")
 | 
						|
dest=${1:-$(mktemp -t recXXX.webm)}
 | 
						|
 | 
						|
ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y "$dest"
 | 
						|
 | 
						|
if [[ -f $dest ]]; then
 | 
						|
  mv $dest .
 | 
						|
fi
 | 
						|
 | 
						|
# vim:set ft=sh shiftwidth=2:
 |