Print daylight hours remaining, cache sunrize time from wttr.in
Download, chmod +x suntime.fish
and put it in your PATH
fish
is required to run this script, but doesn't have to be your SHELL
to do it.
You can set a cron job to periodically update sunrize and sunset times:
0 0 */21 * * /path/to/suntime.fish update
If no LOC
is set wttr.in will use geo-ip for location.
You can set this in the script file or like this:
LOC=Stavanger,Norway suntime.fish update
Can chain with other scripts to change themes at sundown:
suntime.fish e && light_theme || dark_theme
License MIT, free to do whatever. Yours to fuck up.
asciinema.org/a/452003