diff --git a/hyprshot b/hyprshot index 0fb976f..4980d71 100755 --- a/hyprshot +++ b/hyprshot @@ -110,6 +110,10 @@ function save_geometry() { local geometry="${1}" local output="" + if ! grep -Pq '^\d+,\d+\s+\d+x\d+$' <<< "$geometry"; then + return 1 + fi + if [ $RAW -eq 1 ]; then grim -g "${geometry}" - return 0