DFMPEG_ENCODING="Encoding with $(cat /tmp/encoding-codec)"
else
DFMPEG_ENCODING="Encoding"
fi
else
DFMPEG_ENCODING="Not encoding"
fi
# no spacing if there's no icon
if [ "$ICON" != "" ]; then
ICONSPACING=" " # one character spacing
fi
# send the notification
SEND_NOTIF() {
FULL_RECSTATUS="$(printf "${ICON}${ICONSPACING}Recording video $DFMPEG_REC_PATH\n${DFMPEG_AUDIO}, ${DFMPEG_ENCODING}\nMiddle click to stop recording.")"
notify-send "$FULL_RECSTATUS"
echo "Notification sent successfully!"
echo "INFO: $FULL_RECSTATUS"
exit 0
}
command -v notify-send > /dev/null && SEND_NOTIF
echo "FATAL: libnotify not installed, can't send notification."