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
Message=' Fully Updated'
LastUsed=1692531430
Message='Fully Updated'

View File

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