From a99f010603be2d7efa7e936b0895dda33931b135 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 25 Mar 2022 01:09:12 +0100 Subject: Redesign replay to save to file and continue on SIGUSR1 --- interactive.sh | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'interactive.sh') diff --git a/interactive.sh b/interactive.sh index 91ae9f7..c02e7e9 100755 --- a/interactive.sh +++ b/interactive.sh @@ -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 -- cgit v1.2.3