feat: Add guard clause for choice variable

Since the script errors out if an argument (a choice) isn't supplied
This commit is contained in:
Olaoluwa Mustapha 2023-11-02 20:00:25 -05:00 committed by GitHub
parent 564e7f7f8a
commit 249a323b69
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"