Merge pull request #211 from OlaoluwaM/patch-1

feat: Add guard clause for choice variable
This commit is contained in:
Piotr Miller 2023-11-03 02:03:19 +01:00 committed by GitHub
commit 89e3af0b9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,13 @@ list_geometry_hypr()
}
CHOICE=$1
# Since the script errors out when a $CHOICE isn't supplied
if [[ -z "$CHOICE" ]]; then
echo "Usage: $0 [fullscreen|region|focused|display]"
exit 1
fi
DIR=${SCREENSHOT_DIR:=$HOME/Screenshots}
mkdir -p "$DIR"