Skip to content

Instantly share code, notes, and snippets.

@norcalli
Created June 24, 2019 19:36
Show Gist options
  • Save norcalli/81fa49055767d84986637151237f7dbd to your computer and use it in GitHub Desktop.
Save norcalli/81fa49055767d84986637151237f7dbd to your computer and use it in GitHub Desktop.
#!/bin/sh
fuser -sk -SIGINT "$0"
test "$1" = off && exit 0
[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -enx "$0" "$0" "$@" || :
exec wf-recorder -f ~/screens/vids/vid-$(date +"%Y-%m-%d-%H%M%S").mp4 -g "$(slurp)"
@norcalli
Copy link
Author

The recording path is hardcoded to my preferences and uses slurp for region recording. Canceling slurp records the whole screen. Running the script again stops screen recording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment