dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.local/bin/corte

22 lines
571 B
Bash
Executable File

#!/bin/sh
ICON_OK="$XDG_DATA_HOME/icons/Haiku/scalable/mimetypes/gnome-mime-video.svg"
ICON_I="$XDG_DATA_HOME/icons/Haiku/scalable/emblems/emblem-important.svg"
if [ -f "/tmp/blaze-pid" ]; then
recpid="$(cat /tmp/blaze-pid)"
# kill with SIGTERM, allowing finishing touches.
kill -15 "$recpid"
rm -f /tmp/blaze-pid
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
(
sleep 3
kill -9 "$recpid"
) > /dev/null 2>&1 &
notify-send -t 5000 -i "$ICON_OK" "Grabación Terminada"
exit
else
notify-send -t 5000 -i "$ICON_I" "Grabación inactiva"
exit 1
fi