record audio script

This commit is contained in:
caandt 2025-07-13 14:40:51 -05:00
parent d5943c2e53
commit 00ad7cb157
2 changed files with 9 additions and 0 deletions

View file

@ -16,6 +16,7 @@ in {
bell = [pipewire libnotify];
nsxiv-rifle = [nsxiv];
screenshot = [maim xclip];
record-audio = [pulseaudio ffmpeg jq];
};
home.file = builtins.listToAttrs (
map

8
user/bin/record-audio Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
monitor="$(pactl -f json info | jq -r '.default_sink_name + ".monitor"')"
exec ffmpeg \
-f pulse \
-i "$monitor" \
-loglevel error \
-ac 2 \
"${@:-a.mp3}"