Add screen recording

This commit is contained in:
Armel van Ravels
2026-07-15 10:24:38 +02:00
parent 7add559324
commit b4fed26fdd
3 changed files with 36 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
{ pkgs }:
pkgs.writeShellApplication {
name = "toggle-recorder";
runtimeInputs = with pkgs; [
wf-recorder
slurp
procps
coreutils
];
text = ''
if pgrep -x wf-recorder >/dev/null; then
pkill -INT wf-recorder
else
wf-recorder \
-g "$(slurp)" \
-f "$HOME/Videos/recording-$(date +%F-%H%M%S).mp4"
fi
'';
}