Improve --version command

This commit is contained in:
Sebastian Sellmeier 2021-06-30 22:53:10 +02:00
parent 7c1f480a4d
commit 0a81e77d8d
No known key found for this signature in database
GPG key ID: 51E2BE0CCC826F98

View file

@ -51,7 +51,7 @@ init_config () {
fi fi
# Please make sure to adjust this before release! # Please make sure to adjust this before release!
VERSION="@VERSION@" VERSION="4.0.0"
# paths # paths
CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/betterlockscreen" CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/betterlockscreen"
@ -83,6 +83,9 @@ init_config () {
# Dunst # Dunst
DUNST_INSTALLED=false && [[ -e "$(command -v dunstctl)" ]] && DUNST_INSTALLED=true DUNST_INSTALLED=false && [[ -e "$(command -v dunstctl)" ]] && DUNST_INSTALLED=true
DUNST_IS_PAUSED=false && [[ "$DUNST_INSTALLED" == "true" ]] && DUNST_IS_PAUSED=$(dunstctl is-paused) DUNST_IS_PAUSED=false && [[ "$DUNST_INSTALLED" == "true" ]] && DUNST_IS_PAUSED=$(dunstctl is-paused)
# Feh
FEH_INSTALLED=false && [[ -e "$(command -v feh)" ]] && FEH_INSTALLED=true
} }
# called before screen is locked # called before screen is locked
@ -916,15 +919,15 @@ for arg in "$@"; do
-v | --version) -v | --version)
echo echo
echo "Version: $VERSION" echo "Betterlockscreen: version: $VERSION (dunst: $DUNST_INSTALLED, feh: $FEH_INSTALLED)"
$i3lockcolor_bin --version $i3lockcolor_bin --version
convert --version convert --version
if [[ -x "$(command -v dunstctl)" ]]; then if [[ "$DUNST_INSTALLED" == "true" ]]; then
dunstctl debug dunstctl debug
fi fi
if [[ -x "$(command -v feh)" ]]; then if [[ "$FEH_INSTALLED" == "true" ]]; then
feh --version feh --version
fi fi