Files
nix-config/systems/modules/home/wm/scripts/toggle-recorder.nix
Armel van Ravels b4fed26fdd Add screen recording
2026-07-15 10:24:38 +02:00

23 lines
370 B
Nix

{ 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
'';
}