aboutsummaryrefslogtreecommitdiff
path: root/interactive.sh
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-03-25 01:09:12 +0100
committerdec05eba <dec05eba@protonmail.com>2022-03-25 03:25:36 +0100
commita99f010603be2d7efa7e936b0895dda33931b135 (patch)
tree58ab0a458a502e015d60246d012896f2fb9dfc2e /interactive.sh
parent5415f56140fc5a77e72973bb7f0c10d059a93959 (diff)
Redesign replay to save to file and continue on SIGUSR1
Diffstat (limited to 'interactive.sh')
-rwxr-xr-xinteractive.sh21
1 files changed, 3 insertions, 18 deletions
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