This commit is contained in:
The-Repo-Club 2023-08-25 18:08:10 +01:00
parent 72f1cf26e1
commit f67c9240e8
No known key found for this signature in database
GPG Key ID: E30EC2FBFB05C44F
3 changed files with 11 additions and 10 deletions

View File

@ -1,2 +1,2 @@
LastUsed=1692982202
LastUsed=1692984119
Message='Fully Updated'

View File

@ -5,11 +5,11 @@ get_updates() {
# load colors
. $HOME/.config/flexiflow_bar/bar_themes/minimal-mistakes
updates=$(yay -Pn)
updates=$(yay -Qu | wc -l)
timestamp=$(date +%s)
icon=" "
icon=""
if [ -z "$updates" ]; then
if [ "$updates" -ge "0" ]; then
updatecount="Fully Updated"
elif [ "$updates" -ge "1" ]; then
updatecount="$updates Update"
@ -18,17 +18,18 @@ get_updates() {
fi
[[ -f $configFile ]] && . $configFile
if [[ -z "$LastUsed" ]] || [[ -z "$Message" ]]; then
printf " %s %s \n" "^c$Foreground^^b$Purple^$icon" "^c$Foreground^^b$Purple_Bright^$updatecount"
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
newtime=$(expr $timestamp + 900)
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
else
if [[ "$timestamp" -ge "$LastUsed" ]]; then
printf " %s %s \n" "^c$Foreground^^b$Purple^$icon" "^c$Foreground^^b$Purple_Bright^$updatecount"
updatecount=" $Message"
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
newtime=$(expr $timestamp + 900)
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
else
updatecount=" $Message"
printf " %s %s \n" "^c$Foreground^^b$Purple^$icon" "^c$Foreground^^b$Purple_Bright^$updatecount"
updatecount="$Message"
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
fi
fi
}

View File

@ -12,7 +12,7 @@
#Created:
# Sun 03 January 2021, 05:09:33 PM [GMT]
#Modified:
# Thu 08 December 2022, 07:36:45 AM [GMT]
# Fri 25 August 2023, 05:45:05 PM [GMT+1]
#
#Description:
# Watch your youtube subscriptions without a youtube account
@ -48,7 +48,7 @@ die() {
}
usage() {
die 'Usage: repomenue_youtube_subs [-c cat_subs] [-g gen_links] [-u update_subs] [-d daemonize]'
die 'Usage: youtube_subs [-c cat_subs] [-g gen_links] [-u update_subs] [-d daemonize]'
}
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*