aboutsummaryrefslogtreecommitdiff
path: root/interactive.sh
diff options
context:
space:
mode:
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