know the phase of the moon with emoji and % (#482)

8 emoji for 8 main phases plus the % 'of full'
😉 dont forget to load it to your status bar
This commit is contained in:
nerrufam 2020-02-13 13:38:29 +01:00 committed by GitHub
parent 4acbbc07d3
commit 8d4a021f37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,18 @@
#!/bin/sh
mnphs=$(pom | grep -io 'new\|waxing cresent\|first quarter\|waxing gibbous\|full\|waning gibbous\|last quarter\|waning cresent' | grep -m1 '.')
prcnt=$(pom | grep -o '..%')
case $mnphs in
"New") icon="🌑" ;;
"Waxing Cresent") icon="🌒" ;;
"First Quarter") icon="🌓" ;;
"Waxing Gibbous") icon="🌔" ;;
"Full") icon="🌕" ;;
"Waning Gibbous") icon="🌖" ;;
"Last Quarter") icon="🌗" ;;
"Waning Cresent") icon="🌘" ;;
*) echo errorrrr ;;
esac
printf "%s %s\\n" "$icon" "$prcnt"