2020-02-13 12:38:29 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-02-16 01:11:20 +00:00
|
|
|
mnphs=$(pom $1 | grep -o 'New\|Waxing Crescent\|First Quarter\|Waxing Gibbous\|Full\|Waning Gibbous\|Last Quarter\|Waning Crescent' | grep -m1 '.')
|
2020-04-01 14:38:03 +00:00
|
|
|
prcnt=$(pom $1 | grep -o '[[:digit:]]*%' | grep -o '[[:digit:]]*' )
|
2020-02-16 01:11:20 +00:00
|
|
|
case "$mnphs" in
|
2020-04-01 14:38:03 +00:00
|
|
|
"New") icon="🌑" prcnt="0" ;;
|
2020-02-16 01:11:20 +00:00
|
|
|
"Waxing Crescent") icon="🌒" ;;
|
2020-04-01 14:38:03 +00:00
|
|
|
"First Quarter") icon="🌓" prcnt="50" ;;
|
2020-02-16 01:11:20 +00:00
|
|
|
"Waxing Gibbous") icon="🌔" ;;
|
2020-04-01 14:38:03 +00:00
|
|
|
"Full") icon="🌕" prcnt="100" ;;
|
2020-02-16 01:11:20 +00:00
|
|
|
"Waning Gibbous") icon="🌖" ;;
|
2020-04-01 14:38:03 +00:00
|
|
|
"Last Quarter") icon="🌗" prcnt="50" ;;
|
2020-02-16 01:11:20 +00:00
|
|
|
"Waning Crescent") icon="🌘" ;;
|
|
|
|
*) echo errorrrr ;;
|
2020-02-13 12:38:29 +00:00
|
|
|
esac
|
|
|
|
|
2020-04-01 14:38:03 +00:00
|
|
|
case $BLOCK_BUTTON in
|
|
|
|
1) $mnphs ;;
|
|
|
|
2) $mnphs ;;
|
|
|
|
3) pgrep -x dunst >/dev/null && notify-send " 🌜$(pom)" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$icon" "$prcnt"%
|