some work on the moon/sun-phase script

This commit is contained in:
Nickiel12 2023-11-06 21:00:12 -08:00
parent c540481dbd
commit dd9ef0eda5
4 changed files with 30 additions and 5 deletions

View file

@ -1 +1,4 @@
#!/usr/env bash
echo "{ }"

View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
moonstate=$(gcal --resource-file=$HOME/.config/eww/scripts/moontime | awk '{print $4}')
sunstate=$(gcal --resource-file=$HOME/.config/eww/scripts/suntime | awk '{print $4}')
moonrise=$(echo $moonstate | awk '{print $1}')
moonset=$(echo $moonstate | awk '{print $2}')
moonphase=$(echo $moonstate | awk '{print $3}')
sunrise=$(echo $sunstate | awk '{print $1}')
sunset=$(echo $sunstate | awk '{print $2}')
echo "{ \"has_color\": false, \"is_sun\": true, \"gradient_angle\": 45 }"

View file

@ -2,7 +2,10 @@
; %( = moonrise %) moonset +XX-XX == lat long, ,-X:XX time-offset from UTC
; gcal --resource-file=<thisfile> -H no -ox
; -H no == no highlight -ox don't show date on every line
0 Moonrise is at %(+47.20-122.24,-8:00
0 Moonset is at %)+47.20-122.24,-8:00
0 Moon phase %O
; 0 Moonrise is at %(+47.20-122.24,-8:00
; 0 Moonset is at %)+47.20-122.24,-8:00
; 0 Moon phase %O
0 %(+47.20-122.24,-8:00
0 %)+47.20-122.24,-8:00
0 %O

View file

@ -1,3 +1,5 @@
; %o = sunrise %) sunset +XX-XX == lat long, ,-X:XX time-offset from UTC
0 Sunrise is at %o+47.20-122.24,-8:00
0 Sunset is at %s+47.20-122.244,-8:00
; 0 Sunrise is at %o+47.20-122.24,-8:00
; 0 Sunset is at %s+47.20-122.244,-8:00
0 %o+47.20-122.24,-8:00
0 %s+47.20-122.244,-8:00