diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-08-03 18:02:39 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-08-03 18:02:39 +0200 |
commit | 329f9e177c087bc7a16d559db0d8104d6733f3b5 (patch) | |
tree | 9f00f516fe411dbe935fe1100a4487bc8d183572 | |
parent | 3196f0c4b5104a2e474075574b6b6a3597c8d76c (diff) |
add cmd-like `pause` utility
-rwxr-xr-x | .local/share/bin/pause | 10 | ||||
-rwxr-xr-x | .local/share/bin/yt-vod | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/.local/share/bin/pause b/.local/share/bin/pause new file mode 100755 index 0000000..8eedbfb --- /dev/null +++ b/.local/share/bin/pause @@ -0,0 +1,10 @@ +#!/bin/sh +ec=0 +if [ $# -ge 1 ] ; then + "$@" + ec=$? +fi +printf "Press enter to exit..." +read +exit $ec + diff --git a/.local/share/bin/yt-vod b/.local/share/bin/yt-vod index 3af9fb7..0eb424d 100755 --- a/.local/share/bin/yt-vod +++ b/.local/share/bin/yt-vod @@ -8,10 +8,10 @@ fi url="https://youtube.com/watch?v=$vid" # download chat -screen -d -m -S "yt-$vid-chat" -- yt-dlp --live-from-start --write-sub --no-download "$url" +screen -d -m -S "yt-$vid-chat" -- pause yt-dlp --live-from-start --write-sub --no-download "$url" # download stream -screen -d -m -S "yt-$vid-vod" -- yt-dlp --live-from-start -S ext "$url" +screen -d -m -S "yt-$vid-vod" -- pause yt-dlp --live-from-start -S ext "$url" echo "started recording! (use screen -r yt-$vid-<tab> to stop)" |