dotfiles

dotfiles.git
git clone git://git.lenczewski.org/dotfiles.git
Log | Files | Refs

twitchcap.sh (457B)


      1 #!/bin/sh
      2 
      3 USAGE() {
      4 	echo "Usage: $0"
      5 	echo "  -a: Use the first monitor"
      6 	echo "  -b: Use the second monitor"
      7 }
      8 
      9 while getopts ":ab" cmdarg; do
     10 	case "$cmdarg" in
     11 		a)
     12 			MONITOR="$DISPLAY+0,0"
     13 			;;
     14 		b)
     15 			MONITOR="$DISPLAY+1920,0"
     16 			;;
     17 		*)
     18 			echo "Unknown option: $cmdarg"
     19 			USAGE
     20 			exit 1
     21 			;;
     22 	esac
     23 done
     24 
     25 [ "${MONITOR:-z}" = "z" ] && USAGE && exit 1
     26 
     27 $HOME/.local/bin/screencap -d "$MONITOR" -a aac -v flv -s $HOME/.config/twitch.streamurl.gpg