From 527723a5247628cdea3ec397946dbb02139c8f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 24 Aug 2019 09:04:36 +0100 Subject: [PATCH] remove sun-rise/set --- openweathermap-fullfeatured.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/openweathermap-fullfeatured.sh b/openweathermap-fullfeatured.sh index 80d5f1b1..dac619c0 100755 --- a/openweathermap-fullfeatured.sh +++ b/openweathermap-fullfeatured.sh @@ -87,18 +87,5 @@ if [ -n "$current" ] && [ -n "$forecast" ]; then trend="" fi - - sun_rise=$(echo "$current" | $JQ ".sys.sunrise") - sun_set=$(echo "$current" | $JQ ".sys.sunset") - now=$($DATE +%s) - - if [ "$sun_rise" -gt "$now" ]; then - daytime=" $(get_duration "$((sun_rise-now))")" - elif [ "$sun_set" -gt "$now" ]; then - daytime=" $(get_duration "$((sun_set-now))")" - else - daytime=" $(get_duration "$((sun_rise-now))")" - fi - - echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime" + echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL" fi