From 0aa28e44a561de64d8fa0f1b0f241e2a433c38ed Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Thu, 18 Sep 2025 10:28:19 +0100 Subject: [PATCH] Add screc --- home/dot_local/bin/executable_conky-i3bar | 9 --------- home/dot_local/bin/executable_screc | 24 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 9 deletions(-) delete mode 100644 home/dot_local/bin/executable_conky-i3bar create mode 100644 home/dot_local/bin/executable_screc diff --git a/home/dot_local/bin/executable_conky-i3bar b/home/dot_local/bin/executable_conky-i3bar deleted file mode 100644 index c79310e..0000000 --- a/home/dot_local/bin/executable_conky-i3bar +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -echo '{"version":1}' - -echo '[' - -echo '[],' - -exec conky -c $1 diff --git a/home/dot_local/bin/executable_screc b/home/dot_local/bin/executable_screc new file mode 100644 index 0000000..4c5aa70 --- /dev/null +++ b/home/dot_local/bin/executable_screc @@ -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 +