mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 12:49:32 -08:00
some work on the moon/sun-phase script
This commit is contained in:
parent
c540481dbd
commit
dd9ef0eda5
4 changed files with 30 additions and 5 deletions
|
@ -1 +1,4 @@
|
|||
#!/usr/env bash
|
||||
|
||||
|
||||
echo "{ }"
|
||||
|
|
17
modules/ewwbar/eww-config/scripts/clock_background.sh
Executable file
17
modules/ewwbar/eww-config/scripts/clock_background.sh
Executable 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 }"
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue