summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/impressive-display6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/impressive-display b/bin/impressive-display
index f04f683..58411e7 100755
--- a/bin/impressive-display
+++ b/bin/impressive-display
@@ -157,6 +157,12 @@ else
RESOLUTION="$DEFAULT_RESOLUTION"
fi
+if ! echo "$PDF_URI" | grep -E "^(file://|http://|https://).*"; then
+ $OUTPUT "ERROR: PDF_URI format not supported: $PDF_URI"
+ $OUTPUT " Use file://<path>/<file>.pdf(.gz) or http(s)://<host>/<path>/<file>.pdf. Doing nothing."
+ exit -1
+fi
+
if [ -n "${RESOLUTION}" ]; then
if type -p xrandr 1>/dev/null; then
xrandr -d :0 --output "$(echo $currentOutput)" --mode $RESOLUTION