mirror of
https://github.com/nwg-piotr/nwg-shell.git
synced 2024-09-11 14:17:12 +03:00
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:
parent
564e7f7f8a
commit
249a323b69
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user