Add screc

This commit is contained in:
Maximilian Friedersdorff 2025-09-18 10:28:19 +01:00
parent 1827aeaba5
commit 0aa28e44a5
2 changed files with 24 additions and 9 deletions

View file

@ -1,9 +0,0 @@
#!/bin/sh
echo '{"version":1}'
echo '['
echo '[],'
exec conky -c $1

View file

@ -0,0 +1,24 @@
#!/bin/sh
# Take a screen recording in webm format using wf-recorder
# The output file is echo'd to stdout and the path copied
# using the text/uri-list mimetype to the clipboard.
tmpd=$(mktemp -d -t screc.XXXXXX)
outfile="${tmpd}/out.webm"
geometry=$(slurp)
wf-recorder -g "$geometry" -c libvpx -f "$outfile" &>1 /dev/null &
recpid=$!
read -sn1 -p 'Press any key to stop recording:'
echo
kill $recpid
echo "$outfile"
wl-copy -t text/uri-list "file://$outfile"
(sleep 60 && rm -r $tmpd) &
disown