Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement