mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
derp
This commit is contained in:
1
.bin/mud.sh
Executable file
1
.bin/mud.sh
Executable file
@@ -0,0 +1 @@
|
||||
ssh mud@hotdog.r -t "MUD_NICKNAME=$LOGNAME mud"
|
||||
49
.bin/space.py
Normal file
49
.bin/space.py
Normal 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)
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user