fix the command and add an app check

parent 3d1ca032
......@@ -117,7 +117,7 @@ process_screenshot() {
case "$app" in
"")
if [ "$output_file" = "-" ]; then
grim -g "${geometry}" --stdout
grim -g "${geometry}" -
elif [ -n "$output_file" ]; then
grim -g "${geometry}" "$output_file"
fi
......@@ -148,7 +148,7 @@ save_geometry() {
fi
if [ "$COMMAND" ]; then
wayshot -s "${geometry}" --stdout | $COMMAND
grim -g "${geometry}" - | $COMMAND
return
fi
......@@ -231,8 +231,13 @@ while true; do
*)
print_error "Неверная опция: $1"
;;
esac
done
if [ -n "$OUTPUT_APP" ]; then
if ! command -v "$OUTPUT_APP" > /dev/null 2>&1; then
print_error "Программа $OUTPUT_APP не установлена."
fi
fi
begin_grab $MODE
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment