Issue-231: Add -v/--version (#246)

This commit is contained in:
Basti 2021-06-21 20:23:31 +02:00 committed by Sebastian Sellmeier
parent 95bd5767ae
commit 6cc1fc16df
No known key found for this signature in database
GPG key ID: 51E2BE0CCC826F98

View file

@ -50,6 +50,9 @@ init_config () {
source "$USER_CONF"
fi
# Please make sure to adjust this before release!
VERSION="@VERSION@"
# paths
CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/betterlockscreen"
CUR_DIR="$CACHE_DIR/current"
@ -817,6 +820,23 @@ for arg in "$@"; do
shift 2
;;
-v | --version)
echo
echo "Version: $VERSION"
i3lock-color --version
convert --version
if [[ -x "$(command -v dunstctl)" ]]; then
dunstctl debug
fi
if [[ -x "$(command -v feh)" ]]; then
feh --version
fi
break
;;
--)
lockargs+=("${@:2}")
break