From a1b488fdc20b3ecd5c0c8c7c2c070982efec7c09 Mon Sep 17 00:00:00 2001 From: yemou Date: Wed, 14 Jul 2021 01:07:45 +0000 Subject: [PATCH] scr: fix behavior on exit --- scritps/scr | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scritps/scr b/scritps/scr index 3df2b27..1152d2c 100755 --- a/scritps/scr +++ b/scritps/scr @@ -1,5 +1,5 @@ #!/bin/sh -# shellcheck disable=SC1090,SC2154 +# shellcheck disable=SC1090,SC1091,SC2154 # SC1090 & SC2154 # The files sourced are user generated files that should contain the needed @@ -115,9 +115,9 @@ scr_aud() { [ "$microphone" ] && [ "$desktop_audio" ] && \ { args="$args -filter_complex amix=inputs=2"; } - # Pressing Ctrl+C will exit the script instead of just wf-recorder. - # Intercept Ctrl+C and exit wf-recorder instead of the script - trap 'kill -2 $aud_pid' INT + # Pressing Ctrl+C will exit the script instead of just ffmpeg. + # Intercept Ctrl+C and do nothing. + trap '' INT # shellcheck disable=SC2086 # Word splitting is favorable here @@ -182,7 +182,7 @@ scr_rec() { # Pressing Ctrl+C will exit the script instead of just wf-recorder. # Intercept Ctrl+C and exit wf-recorder instead of the script - trap 'kill -2 $rec_pid' INT + trap '' INT if [ "$output" ]; then set -- -o "$output"; else set -- -g "$(slurp)"; fi # Word splitting is favorable here -- 2.51.2