Closed ycf83 closed 6 years ago
Could you say what values you get and what you expect?
i don't get the same time for sunrise or sunset like on openweathermap.org , for sunrise it's always show 11h16 and it's wrong it's should be 6:50 AM for example
What is your CITY=""
var?
CITY="2507480" UNITS="metric" SYMBOL="°"
Ah, found your problem. This value displays the duration until the next sunset or sunrise.
But you could adapt that script to show the value as a time.
thnk's for help bro, im not programmer i don't know how to do, if u can help please sir
Replace lines 79-85:
if [ "$sun_rise" -gt "$now" ]; then
daytime=" $(date --date="@$sun_rise" -u +%H:%M)"
elif [ "$sun_set" -gt "$now" ]; then
daytime=" $(date --date="@$sun_set" -u +%H:%M)"
else
daytime=" $(date --date="@$sun_rise" -u +%H:%M)"
fi
@x70b1 Not related to the issue, but what do the @
s do in that?
@132ikl It indicates that we're providing a timestamp.
@x70b1 , thnk's a lot men, everything is good , u can close this issue if u want , thnk's you so much :+1:
Maybe this should be properly implemented as an option into the script?
Yes, maybe. On the other hand, everyone can modify their own script as they like.
There's also people like OP who don't necessarily have the knowledge of how to do more complex scripting with bash, who would appreciate more options. Maybe there should be a standard to allow for small options (such as this issue or the one I implemented in info-twitch-countdown), similar to the way the boilerplate icon is handled
Yes, but it leads to a question: Where do we stop? We can not handle every case. Yes, there are a lot of nice ideas out there. But I want to keep things simple. The most scripts have only a few lines. I don't want to blow them up with many if-else conditions.
This repository is also already nearly foolproof. The reason for this is: There are no hundreds of options. There are simple scripts. That's all.
I knew this problem would occur. This is why README.md
says the following:
This repository is not an exact blueprint. I guess every script has to be customized to make your Polybar unique.
That's fair. Maybe some remarkably modifiable scripts could have an "additions.txt" or something, which could include small modifications (such as those previously listed) users can make to customize their scripts. That may get out of hand as well, though, so that's simply an idea.
hi , i use your script weather full, it's very good, easy to use , but i get wrong information about the next sunrise or sunset , i don't know way, weather information is good .