1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
This commit is contained in:
2022-01-02 17:58:21 +01:00
parent 9ebcf731df
commit f0924d7d57
3 changed files with 51 additions and 0 deletions

1
.bin/mud.sh Executable file
View File

@@ -0,0 +1 @@
ssh mud@hotdog.r -t "MUD_NICKNAME=$LOGNAME mud"

49
.bin/space.py Normal file
View File

@@ -0,0 +1,49 @@
import ephem
from datetime import datetime, date, timedelta
now = datetime.now()
limit = now + timedelta(days=365)
def events_until(limit):
initial_date = ephem.Date(datetime.now())
events = {}
now = initial_date
while ephem.localtime(now) <= limit:
now = ephem.next_full_moon(now)
events[now] = "🌕"
now = initial_date
while ephem.localtime(now) <= limit:
now = ephem.next_new_moon(now)
events[now] = "🌑"
now = initial_date
while ephem.localtime(now) <= limit:
now = ephem.next_vernal_equinox(now)
events[now] = "spring equinox"
now = initial_date
while ephem.localtime(now) <= limit:
now = ephem.next_autumnal_equinox(now)
events[now] = "fall equinox"
now = initial_date
while ephem.localtime(now) <= limit:
now = ephem.next_winter_solstice(now)
events[now] = "winter solstice"
now = initial_date
while ephem.localtime(now) <= limit:
now = ephem.next_summer_solstice(now)
events[now] = "summer solstice"
return events
events = events_until(limit)
for date, event in sorted(events.items(), key=lambda x: x[0]):
if ephem.localtime(date) < limit:
print(ephem.localtime(date), event)

View File

@@ -96,6 +96,7 @@ in {
block = "custom";
interval = 60 * 5;
command = let inherit (import <niveum/configs/spacetime.nix>) location; in "${pkgs.scripts.horoscope}/bin/horoscope --latitude=${toString location.latitude} --longitude=${toString location.longitude}";
# astrolog -zN Berlin -n -k | tail -n +4 | head -n 7 | sed 's/://g;s/\s\+/ /g;s/ R/R/;s/\[\s*/[/g;s/Sun/☉/;s/Moon/☽/;s/Merc/☿/;s/Venu/♀/;s/Mars/♂/;s/Jupi/♃/;s/Satu/♄/' | cut -f1-2 -d' ' | paste -sd' ' -
}
{
block = "custom";