aboutsummaryrefslogtreecommitdiff
path: root/stopScreenRecord.sh
diff options
context:
space:
mode:
Diffstat (limited to 'stopScreenRecord.sh')
-rwxr-xr-xstopScreenRecord.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/stopScreenRecord.sh b/stopScreenRecord.sh
new file mode 100755
index 0000000..680f2f4
--- /dev/null
+++ b/stopScreenRecord.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+MARKFILE='/tmp/screenRec.mark'
+# Terminate ffmpeg processes
+for process in $(pgrep -x ffmpeg)
+do
+ kill "$process" && notify-send -t 1000 "ffmpeg $process stopped."
+done
+# Terminate screenRecord.sh processes
+for process in $(pgrep -x screenRecord.sh)
+do
+ kill "$process" && notify-send -t 1000 "Recording $process stopped."
+done
+rm $MARKFILE
+pkill -SIGRTMIN+13 i3blocks