From f67c9240e8a7fd70651daeb230cc63b867422ca7 Mon Sep 17 00:00:00 2001 From: The-Repo-Club Date: Fri, 25 Aug 2023 18:08:10 +0100 Subject: [PATCH] Update --- .../flexiflow/flexiflow_bar/bar_updates.ini | 2 +- .../.local/bin/flexiflow_bar/bar_updates | 15 ++++++++------- rofi/.local/bin/rofi/youtube_subs | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/flexiflow/.config/flexiflow/flexiflow_bar/bar_updates.ini b/flexiflow/.config/flexiflow/flexiflow_bar/bar_updates.ini index 7cb4f768f..386679cf7 100644 --- a/flexiflow/.config/flexiflow/flexiflow_bar/bar_updates.ini +++ b/flexiflow/.config/flexiflow/flexiflow_bar/bar_updates.ini @@ -1,2 +1,2 @@ -LastUsed=1692982202 +LastUsed=1692984119 Message='Fully Updated' diff --git a/flexiflow_bar/.local/bin/flexiflow_bar/bar_updates b/flexiflow_bar/.local/bin/flexiflow_bar/bar_updates index 6d77d7eb8..5b802dd3d 100755 --- a/flexiflow_bar/.local/bin/flexiflow_bar/bar_updates +++ b/flexiflow_bar/.local/bin/flexiflow_bar/bar_updates @@ -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 } diff --git a/rofi/.local/bin/rofi/youtube_subs b/rofi/.local/bin/rofi/youtube_subs index cce6ba0e6..958821811 100755 --- a/rofi/.local/bin/rofi/youtube_subs +++ b/rofi/.local/bin/rofi/youtube_subs @@ -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]' } # -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*