blob: 6ccc81b47d8a92f198707dd44ea252d2bb9911af (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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"
|