From 4814403bbf58794da3349f21e55746e50e68eab4 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 8 Apr 2020 22:01:51 -0400 Subject: pgrep junk removed and minor script changes --- .local/bin/statusbar/moonphase | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.local/bin/statusbar/moonphase') diff --git a/.local/bin/statusbar/moonphase b/.local/bin/statusbar/moonphase index 09af87b..12ed90b 100755 --- a/.local/bin/statusbar/moonphase +++ b/.local/bin/statusbar/moonphase @@ -1,5 +1,7 @@ #!/bin/sh +# Shows the current moon phase. Requires `pom-perl`. + 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:]]*%' | grep -o '[[:digit:]]*' ) case "$mnphs" in @@ -17,7 +19,7 @@ esac case $BLOCK_BUTTON in 1) $mnphs ;; 2) $mnphs ;; - 3) pgrep -x dunst >/dev/null && notify-send " 🌜$(pom)" ;; + 3) notify-send " 🌜$(pom)" ;; esac echo "$icon" "$prcnt"% -- cgit v1.3.1