dotfiles/bin/executable_screenrecording

14 lines
326 B
Bash

#!/usr/bin/env bash
FOLDER="/home/bascht/Videos/Screenrecordings/$(date +'%Y-%m')"
mkdir -p "${FOLDER}"
NAME="${FOLDER}/$(date +%Y-%m-%d-%H%M%S)"
if [[ -n "${*}" ]]; then
NAME="${NAME}-${*}";
fi;
wf-recorder -d /dev/dri/renderD128 -c libvpx-vp9 -g "$(slurp-window)" -f "${NAME}.webm" > /dev/null 2>&1
echo "${NAME}.webm"