diff --git a/forecast.sh b/forecast.sh
index 8c46bf5..6549f84 100755
--- a/forecast.sh
+++ b/forecast.sh
@@ -205,7 +205,6 @@ while true; do
let i=0
while [ $i -lt 40 ]; do
CastDate=$(date +"%s" -d @${NixDate[$i]})
- #CastDate=$(date +"%m%d" -d @${NixDate[$i]})
if [ $CastDate -le $TomorrowDate ]; then
ShortDate=$(date +"%m/%d@%R" -d @${NixDate[$i]})
if [ "$colors" = "True" ]; then
@@ -226,46 +225,46 @@ while true; do
fi
i=$((i + 1))
done
- fi
- if [ "$OpenBox" = "True" ]; then
- echo ''
- echo ''
- printf ' \n' "$Station" "$AsOf"
- let i=0
- while [ $i -lt 40 ]; do
- CastDate=$(date +"%m%d" -d @${NixDate[$i]})
- if [ $CastDate = $NowDate ]; then
- ShortDate=$(date +"%m/%d@%R" -d @${NixDate[$i]})
- printf '- '
+ echo ''
+ printf '
\n' "$Station" "$AsOf"
+ let i=0
+ while [ $i -lt 40 ]; do
+ CastDate=$(date +"%s" -d @${NixDate[$i]})
+ if [ $CastDate -le $TomorrowDate ]; then
ShortDate=$(date +"%m/%d@%R" -d @${NixDate[$i]})
printf '- '
- fi
- if [ "$HTML" = "True" ];then
- echo "Forecast for $Station as of: $AsOf
"
- let i=0
- while [ $i -lt 40 ]; do
- CastDate=$(date +"%m%d" -d @${NixDate[$i]})
- if [ $CastDate = $NowDate ]; then
- ShortDate=$(date +"%m/%d@%R" -d @${NixDate[$i]})
- printf "%-12s %-2s%-20s %-15s %-14s %-14s %-14s
\n" "$ShortDate:" "${icon[$i]} " "${LongWeather[$i]}" "Temp:${temperature[$i]}°${degreeCharacter^^}" "Wind:${WindSpeed[$i]}$windunit" "Humidity:${Humidity[$i]}%" "Cloud Cover:${CloudCover[$i]}%"
- else
- CastHour=$(date +"%-H" -d @${NixDate[$i]})
- if [ "$CastHour" -ge "$NowHigh" ] && [ "$CastHour" -le "$NowLow" ]; then
+ i=$((i + 1))
+ done
+ echo ' '
+ fi
+ if [ "$HTML" = "True" ];then
+ echo "Forecast for $Station as of: $AsOf
"
+ let i=0
+ while [ $i -lt 40 ]; do
+ CastDate=$(date +"%s" -d @${NixDate[$i]})
+ if [ $CastDate -le $TomorrowDate ]; then
ShortDate=$(date +"%m/%d@%R" -d @${NixDate[$i]})
printf "%-12s %-2s%-20s %-15s %-14s %-14s %-14s
\n" "$ShortDate:" "${icon[$i]} " "${LongWeather[$i]}" "Temp:${temperature[$i]}°${degreeCharacter^^}" "Wind:${WindSpeed[$i]}$windunit" "Humidity:${Humidity[$i]}%" "Cloud Cover:${CloudCover[$i]}%"
- fi
- fi
- i=$((i + 1))
- done
- fi
+ else
+ CastHour=$(date +"%-H" -d @${NixDate[$i]})
+ if [ $CastHour -ge $NowHigh ] && [ $CastHour -le $NowLow ]; then
+ ShortDate=$(date +"%m/%d@%R" -d @${NixDate[$i]})
+ printf "%-12s %-2s%-20s %-15s %-14s %-14s %-14s
\n" "$ShortDate:" "${icon[$i]} " "${LongWeather[$i]}" "Temp:${temperature[$i]}°${degreeCharacter^^}" "Wind:${WindSpeed[$i]}$windunit" "Humidity:${Humidity[$i]}%" "Cloud Cover:${CloudCover[$i]}%"
+ fi
+ fi
+ i=$((i + 1))
+ done
+ fi
if [ $dynamicUpdates -eq 0 ];then
break
fi