Skip to content

Instantly share code, notes, and snippets.

@Dkendal
Created May 16, 2017 22:29
Show Gist options
  • Save Dkendal/414097821f409f3e4948a5878e138d99 to your computer and use it in GitHub Desktop.
Save Dkendal/414097821f409f3e4948a5878e138d99 to your computer and use it in GitHub Desktop.
#!/bin/zsh
DURATION=$1
BUCKET_NAME=dkendal-gifs
BUCKET=s3:$BUCKET_NAME/
FILE_NAME=`date +%s`.gif
FILE_PATH=~/gifs/$FILE_NAME
UPLOAD_PATH=https://s3.amazonaws.com/$BUCKET_NAME/$FILE_NAME
byzanz-record `xrectsel "-x %x -y %y -w %w -h %h"` -d $DURATION $FILE_PATH
rclone copy $FILE_PATH $BUCKET
echo $UPLOAD_PATH | xclip -selection p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment