TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Daylight – track sunrise / sunset times in your terminal

79 pointsby jbreckmckye2 months ago
I love the sunlight and dread the long, dark winter evenings of Northern Europe. I often look up sunrise &#x2F; sunset times and count off the days until the darkness is gone.<p>Now I&#x27;ve written a terminal app for this (Mac&#x2F;Linux)<p>Features: a colorful summary of daylight times for your location; projected change over the coming days; handles NO_COLOR and a ---short flag if you dislike the output format.<p>The location is IP-based but you can override this if you&#x27;re on a VPN. Just create a terminal alias with the --loc flag. The app supports areas in the arctic &#x2F; antarctic circle too.<p>Check our the repository for a preview and instructions on how you can install it with Homebrew.<p>(There is a Windows build but it&#x27;s not yet tested)

9 comments

oftenwrong2 months ago
I was curious how the times were obtained. It uses <a href="https:&#x2F;&#x2F;github.com&#x2F;nathan-osman&#x2F;go-sunrise" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nathan-osman&#x2F;go-sunrise</a> , which links to this calculation method: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Sunrise_equation#Complete_calculation_on_Earth" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Sunrise_equation#Complete_calc...</a>
评论 #43349075 未加载
ndegruchy2 months ago
Of course, you can get this information in Emacs, too. You&#x27;ll need to get your lat and long, first:<p><pre><code> (setq calendar-latitude 12.3456 calendar-longitude -98.7654) </code></pre> Then, you can `M-x sunrise-sunset` and see the times (and total daylight hours) in the echo area.
评论 #43348644 未加载
rrr_oh_man2 months ago
Great looking app!!<p>I immediately checked how you do location lookups:<p><i>&gt; IP lookup is powered by <a href="https:&#x2F;&#x2F;ipinfo.io" rel="nofollow">https:&#x2F;&#x2F;ipinfo.io</a>. They provide a good service so please don&#x27;t spam requests.</i><p>There was a thread about them recently — the scale of their operation was very surprising.
评论 #43351408 未加载
评论 #43345929 未加载
japaget2 months ago
Windows build works fine (Windows 10 Professional x64 22H2).
评论 #43345833 未加载
JimmyDeepabout 2 months ago
I live in a place where it often rains, and I really love sunny weather. It makes me feel a bit down when I see that it&#x27;s already dark by the time I get off work. I was wondering, since the Earth&#x27;s revolution is taken into account, the time you get should be different every day, right?
voidUpdate2 months ago
Does this pull the times from an online service or are they calculated locally? I tried to read the code to work it out but I don&#x27;t program in Go so I got a little lost
评论 #43345846 未加载
thenthenthen2 months ago
Cool! Can we use the sky hue as Terminal background or overal “theme”?
jrootabega2 months ago
Is the noon color scheme supposed to look like Finn from Adventure Time?
kseistrup2 months ago
This is nice, I like it!<p>Is there a way to make it use 24h time, rather than AM&#x2F;PM?
评论 #43347153 未加载