mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2024-11-25 00:38:20 -05:00
Update
This commit is contained in:
parent
72f1cf26e1
commit
f67c9240e8
@ -1,2 +1,2 @@
|
|||||||
LastUsed=1692982202
|
LastUsed=1692984119
|
||||||
Message='Fully Updated'
|
Message='Fully Updated'
|
||||||
|
@ -5,11 +5,11 @@ get_updates() {
|
|||||||
# load colors
|
# load colors
|
||||||
. $HOME/.config/flexiflow_bar/bar_themes/minimal-mistakes
|
. $HOME/.config/flexiflow_bar/bar_themes/minimal-mistakes
|
||||||
|
|
||||||
updates=$(yay -Pn)
|
updates=$(yay -Qu | wc -l)
|
||||||
timestamp=$(date +%s)
|
timestamp=$(date +%s)
|
||||||
icon=" "
|
icon=""
|
||||||
|
|
||||||
if [ -z "$updates" ]; then
|
if [ "$updates" -ge "0" ]; then
|
||||||
updatecount="Fully Updated"
|
updatecount="Fully Updated"
|
||||||
elif [ "$updates" -ge "1" ]; then
|
elif [ "$updates" -ge "1" ]; then
|
||||||
updatecount="$updates Update"
|
updatecount="$updates Update"
|
||||||
@ -18,17 +18,18 @@ get_updates() {
|
|||||||
fi
|
fi
|
||||||
[[ -f $configFile ]] && . $configFile
|
[[ -f $configFile ]] && . $configFile
|
||||||
if [[ -z "$LastUsed" ]] || [[ -z "$Message" ]]; then
|
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)
|
newtime=$(expr $timestamp + 900)
|
||||||
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
|
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
|
||||||
else
|
else
|
||||||
if [[ "$timestamp" -ge "$LastUsed" ]]; then
|
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)
|
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$Purple^$icon" "^c$Foreground^^b$Purple_Bright^$updatecount"
|
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#Created:
|
#Created:
|
||||||
# Sun 03 January 2021, 05:09:33 PM [GMT]
|
# Sun 03 January 2021, 05:09:33 PM [GMT]
|
||||||
#Modified:
|
#Modified:
|
||||||
# Thu 08 December 2022, 07:36:45 AM [GMT]
|
# Fri 25 August 2023, 05:45:05 PM [GMT+1]
|
||||||
#
|
#
|
||||||
#Description:
|
#Description:
|
||||||
# Watch your youtube subscriptions without a youtube account
|
# Watch your youtube subscriptions without a youtube account
|
||||||
@ -48,7 +48,7 @@ die() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
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]'
|
||||||
}
|
}
|
||||||
|
|
||||||
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||||
|
Loading…
Reference in New Issue
Block a user