Skip to content

Instantly share code, notes, and snippets.

@TheMichaelHu
Created November 3, 2016 19:23
Show Gist options
  • Save TheMichaelHu/d8ad0ae031f78cc65b795d8f107a845f to your computer and use it in GitHub Desktop.
Save TheMichaelHu/d8ad0ae031f78cc65b795d8f107a845f to your computer and use it in GitHub Desktop.
Screen Record gifs on Ubuntu/Linux Mint
#!/bin/bash
# Install xrectsel (from https://github.com/lolilolicon/xrectsel/) and byzanz (sudo apt-get install byzanz)
# Throw this script somewhere and make an alias (I called mine gif)
# Change the destination file if your name isn't michael
AREA="$(xrectsel)"
IFS=+ read DIM X Y <<< $AREA
IFS=x read W H <<< $DIM
DATE=`date +%Y%m%d%H%M%S`
echo start
byzanz-record --duration=7 --x=$X --y=$Y --width=$W --height=$H /home/michael/Pictures/out${DATE}.gif
echo end
eog /home/michael/Pictures/out${DATE}.gif # should probably change this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment