diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2020-04-08 22:01:51 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2020-04-08 22:01:51 -0400 |
| commit | 4814403bbf58794da3349f21e55746e50e68eab4 (patch) | |
| tree | 3bc52b7cd8eefc02d9d74e1442e7a979507b460d /.local/bin/statusbar/moonphase | |
| parent | 3e8f5c1647e15586b7ec09f9c415b3a50f49e6ac (diff) | |
| download | eibhear-4814403bbf58794da3349f21e55746e50e68eab4.tar.gz eibhear-4814403bbf58794da3349f21e55746e50e68eab4.tar.zst eibhear-4814403bbf58794da3349f21e55746e50e68eab4.zip | |
pgrep junk removed and minor script changes
Diffstat (limited to '.local/bin/statusbar/moonphase')
| -rwxr-xr-x | .local/bin/statusbar/moonphase | 4 |
1 files changed, 3 insertions, 1 deletions
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"% |
