Update bar script

This commit is contained in:
The-Repo-Club 2023-08-20 12:27:21 +01:00
parent 1a5e101547
commit bdbf8c8835
No known key found for this signature in database
GPG Key ID: E30EC2FBFB05C44F
2 changed files with 6 additions and 6 deletions

View File

@ -1,2 +1,2 @@
LastUsed=1692530530 LastUsed=1692531430
Message=' Fully Updated' Message='Fully Updated'

View File

@ -10,11 +10,11 @@ get_updates() {
icon="  " icon="  "
if [ -z "$updates" ]; then if [ -z "$updates" ]; then
updatecount=" Fully Updated" updatecount="Fully Updated"
elif [ "$updates" -ge "1" ]; then elif [ "$updates" -ge "1" ]; then
updatecount=" $updates Update" updatecount="$updates Update"
else else
updatecount=" $updates Updates" updatecount="$updates Updates"
fi fi
[[ -f $configFile ]] && . $configFile [[ -f $configFile ]] && . $configFile
if [[ -z "$LastUsed" ]] || [[ -z "$Message" ]]; then if [[ -z "$LastUsed" ]] || [[ -z "$Message" ]]; then
@ -27,7 +27,7 @@ get_updates() {
newtime=$(expr $timestamp + 900) newtime=$(expr $timestamp + 900)
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
else else
updatecount="$Message" updatecount=" $Message"
printf " %s %s \n" "^c$Foreground^^b$Red^$icon" "^c$Foreground^^b$Red_Bright^$updatecount" printf " %s %s \n" "^c$Foreground^^b$Red^$icon" "^c$Foreground^^b$Red_Bright^$updatecount"
fi fi
fi fi