From 0cb59b46e890a86e67133fdc561671fa5b371d6f Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Tue, 15 Oct 2019 20:35:37 +0200 Subject: Added dunstifyID and changed some emojis on i3moon.sh. --- i3blocks/i3moon.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'i3blocks/i3moon.sh') 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" - -- cgit v1.2.1