Redesign replay to save to file and continue on SIGUSR1

This commit is contained in:
dec05eba
2022-03-25 01:09:12 +01:00
parent 5415f56140
commit a99f010603
8 changed files with 238 additions and 206 deletions

View File

@@ -1,28 +1,13 @@
#!/usr/bin/env bash
#!/bin/sh -e
set -e
print_selected_window_id() {
xwininfo | grep 'Window id:' | cut -d' ' -f4
}
selected_audio_input="$(pactl get-default-sink).monitor"
echo "Select a window to record"
window_id=$(print_selected_window_id)
window_id=$(xdotool selectwindow)
echo -n "Enter video fps: "
read fps
echo "Select audio input:"
selected_audio_input=""
select audio_input in $(pactl list | sed -rn 's/Monitor Source: (.*)/\1/p'); do
if [ "$audio_input" == "" ]; then
echo "Invalid option $REPLY"
else
selected_audio_input="$audio_input"
break
fi
done
echo -n "Enter output file name: "
read output_file_name