Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Requirements:
  4. # - byzanz-record to perform the actual screencast
  5. # - xrectsel to be able to select which part of the screen you want to record
  6. # - yad to display the stop button in your notification area
  7. # - gsd-locate-pointer (optional) to be able to highlight the cursor when pressing Ctrl
  8.  
  9. # Output file name
  10. FILE="$HOME/documents/videos/`date +%FT%T.gif`"
  11.  
  12. ARGUMENTS=$(xrectsel "--x=%x --y=%y --width=%w --height=%h")
  13.  
  14. if [ -x /usr/lib/gnome-settings-daemon/gsd-locate-pointer ]; then
  15. /usr/lib/gnome-settings-daemon/gsd-locate-pointer &
  16. locate_pointer_pid=$!
  17. fi
  18.  
  19. byzanz-record --delay 0 $ARGUMENTS --exec "yad --notification --image media-playback-stop" $FILE
  20. echo $FILE
  21.  
  22. if [ "$locate_pointer_pid" != "" ]; then
  23. kill $locate_pointer_pid
  24. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement