From 30dd19933796895d59fcdaf9496ba66161e3c3a0 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Fri, 22 May 2020 22:57:34 -0500 Subject: [PATCH] Add error message if camera can't open --- scripts/core/sxmo_camera.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/core/sxmo_camera.sh b/scripts/core/sxmo_camera.sh index 9cc9413..5911419 100755 --- a/scripts/core/sxmo_camera.sh +++ b/scripts/core/sxmo_camera.sh @@ -1,3 +1,7 @@ #!/usr/bin/env sh +err() { + echo -e "$1" | dmenu -fn Terminus-20 -c -l 10 +} + media-ctl -d /dev/media1 --set-v4l2 '"ov5640 3-004c":0[fmt:UYVY8_2X8/1280x720]' -mpv --video-rotate=90 av://v4l2:/dev/video1 +mpv --video-rotate=90 av://v4l2:/dev/video1 || err "Couldn't open camera, is camera enabled?"