Last active
March 7, 2017 09:14
-
-
Save madx/f2c57cd7b88bedba3f32673aa6fbe4e5 to your computer and use it in GitHub Desktop.
Quick GIF screencast recording on linux
This file contains 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 | |
# Requirements: | |
# - byzanz-record to perform the actual screencast | |
# - xrectsel to be able to select which part of the screen you want to record | |
# - yad to display the stop button in your notification area | |
# - gsd-locate-pointer (optional) to be able to highlight the cursor when pressing Ctrl | |
# Output file name | |
FILE="$HOME/documents/videos/`date +%FT%T.gif`" | |
ARGUMENTS=$(xrectsel "--x=%x --y=%y --width=%w --height=%h") | |
if [ -x /usr/lib/gnome-settings-daemon/gsd-locate-pointer ]; then | |
/usr/lib/gnome-settings-daemon/gsd-locate-pointer & | |
locate_pointer_pid=$! | |
fi | |
byzanz-record --delay 0 $ARGUMENTS --exec "yad --notification --image media-playback-stop" $FILE | |
echo $FILE | |
if [ "$locate_pointer_pid" != "" ]; then | |
kill $locate_pointer_pid | |
fi |
This file contains 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
#!/usr/bin/env bash | |
mount | grep -q $HOME/drops | |
if [ $? -ne 0 ]; then | |
notify-send Screenshot "Drops shared folder not mounted" | |
exit 1 | |
fi | |
FILENAME=$(date +%F-%T).gif | |
FILEPATH="$HOME/drops/$FILENAME" | |
CAST=$(gifcast) | |
cp "$CAST" "$FILEPATH" | |
chmod go+r "$FILEPATH" | |
firefox --new-tab http://drop.madx.me/$FILENAME | |
# chromium http://drop.madx.me/$FILENAM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment