🌜updated moonphase🌛 (#532)
right click to open notification left & middle to update fixes specific dates
This commit is contained in:
parent
3ae11f5969
commit
22ff37646c
1 changed files with 12 additions and 6 deletions
|
@ -1,17 +1,23 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
mnphs=$(pom $1 | grep -o 'New\|Waxing Crescent\|First Quarter\|Waxing Gibbous\|Full\|Waning Gibbous\|Last Quarter\|Waning Crescent' | grep -m1 '.')
|
mnphs=$(pom $1 | grep -o 'New\|Waxing Crescent\|First Quarter\|Waxing Gibbous\|Full\|Waning Gibbous\|Last Quarter\|Waning Crescent' | grep -m1 '.')
|
||||||
prcnt=$(pom $1 | grep -o '[[:digit:]]*%')
|
prcnt=$(pom $1 | grep -o '[[:digit:]]*%' | grep -o '[[:digit:]]*' )
|
||||||
case "$mnphs" in
|
case "$mnphs" in
|
||||||
"New") icon="🌑" prcnt="0%" ;;
|
"New") icon="🌑" prcnt="0" ;;
|
||||||
"Waxing Crescent") icon="🌒" ;;
|
"Waxing Crescent") icon="🌒" ;;
|
||||||
"First Quarter") icon="🌓" prcnt="50%" ;;
|
"First Quarter") icon="🌓" prcnt="50" ;;
|
||||||
"Waxing Gibbous") icon="🌔" ;;
|
"Waxing Gibbous") icon="🌔" ;;
|
||||||
"Full") icon="🌕" prcnt="100%" ;;
|
"Full") icon="🌕" prcnt="100" ;;
|
||||||
"Waning Gibbous") icon="🌖" ;;
|
"Waning Gibbous") icon="🌖" ;;
|
||||||
"Last Quarter") icon="🌗" prcnt="50%" ;;
|
"Last Quarter") icon="🌗" prcnt="50" ;;
|
||||||
"Waning Crescent") icon="🌘" ;;
|
"Waning Crescent") icon="🌘" ;;
|
||||||
*) echo errorrrr ;;
|
*) echo errorrrr ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
printf "%s %s\\n" "$icon" "$prcnt"
|
case $BLOCK_BUTTON in
|
||||||
|
1) $mnphs ;;
|
||||||
|
2) $mnphs ;;
|
||||||
|
3) pgrep -x dunst >/dev/null && notify-send " 🌜$(pom)" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "$icon" "$prcnt"%
|
||||||
|
|
Loading…
Reference in a new issue