arc: add update information to headline

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2024-02-16 19:29:54 +01:00
parent 1aa4c9ad8c
commit 3bebbf3f33

View File

@@ -62,9 +62,15 @@ STATICIP="$(readConfigKey "arc.staticip" "${USER_CONFIG_FILE}")"
ARCIPV6="$(readConfigKey "arc.ipv6" "${USER_CONFIG_FILE}")"
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
# Update Check
NEWTAG="$(curl --insecure -s https://api.github.com/repos/AuxXxilium/arc/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')"
###############################################################################
# Mounts backtitle dynamically
function backtitle() {
if [ ! "${NEWTAG}" = "${ARC_VERSION}" ]; then
ARC_TITLE="${ARC_TITLE} | Update: ${NEWTAG}"
fi
BACKTITLE="${ARC_TITLE} |"
if [ -n "${MODEL}" ]; then
BACKTITLE+=" ${MODEL}"