diff options
Diffstat (limited to 'i3blocks/i3moon.sh')
-rwxr-xr-x | i3blocks/i3moon.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/i3blocks/i3moon.sh b/i3blocks/i3moon.sh index fcb45dc..e86c4ca 100755 --- a/i3blocks/i3moon.sh +++ b/i3blocks/i3moon.sh @@ -2,18 +2,19 @@ # Shows an emoji with the phase of the moon -pom | grep -q "New Moon" && moon=🌑 +[ ! -f "/bin/pom" ] && echo "🌜 bsd-games not installed. 🌛" && exit 0 +pom | grep -q "New" && moon=🌚 pom | grep -q "Waxing Crescent" && moon=🌒 pom | grep -q "First Quarter" && moon=🌓 pom | grep -q "Waxing Gibbous" && moon=🌔 -pom | grep -q "Full moon" && moon=🌕 +pom | grep -q "Full" && moon=🌝 pom | grep -q "Waning Gibbous" && moon=🌖 pom | grep -q "Last Quarter" && moon=🌗 pom | grep -q "Waning Crescent" && moon=🌘 +echo "$moon" + case $BLOCK_BUTTON in - 1) dunstify "$moon $(pom) $moon";; + 1) dunstify -r "$(dunstifyIDs.sh "moon")" "$moon $(pom) $moon";; esac -echo "$moon" - |