wf-shadow bugfix 2 electric boogaloo

Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2023-05-12 18:17:30 -04:00
parent f7bfadd9a2
commit 6a31953e16
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ EOF
}
record() {
local FILE="$HOME"/Videos/wf-shadow/"$(date +%Y%m%d_%H:%M:%S)__$2".mp4
local FILE="${WF_SHADOW_SAVE:-"$HOME"/Videos/wf-shadow/"$(date +%Y%m%d_%H:%M:%S)__$2".mp4}"
ffmpeg -nostdin -y -sseof -"$2" -i "$1" "$FILE" ${VERBOSE:-&>/dev/null} &&
notify-send "Clip saved" "$2 second clip saved to $FILE"
}
@ -76,7 +76,7 @@ start() {
for i in /tmp/wf-shadow/tmp{00..10}.mp4; do
touch "$i"
wf-recorder ${VIDEO_DEV:+-d "$VIDEO_DEV"} -a $AUDIO_DEV -f "$i" <<< y$'\n'$MONITOR ${VERBOSE:-&>/dev/null} &
printf "%s" "$!" > "$RUNTIME"/'"$MONITOR"'.pid
printf "%s" "$!" > "$RUNTIME"/"$MONITOR".pid
fg || exit
case "$(printf "5 seconds\n10 seconds\n15 seconds\n30 seconds\n1 minute\n5 minutes\n10 minutes\nCancel\n" | wofi --dmenu -i -H 500 -W 250 -x 0 -y 0 ${VERBOSE:-&>/dev/null} )" in