diff --git a/.config/polybar/scripts/real.sh b/.config/polybar/scripts/real.sh index a496dc2..6661905 100755 --- a/.config/polybar/scripts/real.sh +++ b/.config/polybar/scripts/real.sh @@ -30,9 +30,16 @@ data="$(curl -s "https://www.real.sammelkalender.ch/app/appSammeldaten.php?nGem= collection_today="$(echo "$data" | jq -r ".[] | select(.DATUM == \"$today\") | .AbarOne")" collection_tomorrow="$(echo "$data" | jq -r ".[] | select(.DATUM == \"$tomorrow\") | .AbarOne")" +has_printed=0 if [[ "$collection_today" != "null" ]]; then format_collections $collection_today + has_printed=1 fi if [[ "$collection_tomorrow" != "null" ]]; then echo "tomorrow: $(format_collections $collection_tomorrow)" + has_printed=1 +fi +# hide the module +if [[ "$has_printed" == "0" ]]; then + echo "" fi