Created
November 3, 2016 19:23
-
-
Save TheMichaelHu/d8ad0ae031f78cc65b795d8f107a845f to your computer and use it in GitHub Desktop.
Screen Record gifs on Ubuntu/Linux Mint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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