summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorHekuran <62762955+narukeh@users.noreply.github.com>2020-04-01 14:38:03 +0000
committerGitHub <noreply@github.com>2020-04-01 10:38:03 -0400
commit22ff37646c3088dd2db78082fa175ae14f581cde (patch)
treeed24667da52279bf760e16085138a9c7e3430425 /.local
parent3ae11f5969d614fd2afa8a24251fa9218aac47cc (diff)
downloadeibhear-22ff37646c3088dd2db78082fa175ae14f581cde.tar.gz
eibhear-22ff37646c3088dd2db78082fa175ae14f581cde.tar.zst
eibhear-22ff37646c3088dd2db78082fa175ae14f581cde.zip
🌜updated moonphaseπŸŒ› (#532)
right click to open notification left & middle to update fixes specific dates
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/statusbar/moonphase18
1 files changed, 12 insertions, 6 deletions
diff --git a/.local/bin/statusbar/moonphase b/.local/bin/statusbar/moonphase
index d2bbad6..09af87b 100755
--- a/.local/bin/statusbar/moonphase
+++ b/.local/bin/statusbar/moonphase
@@ -1,17 +1,23 @@
#!/bin/sh
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
- "New") icon="πŸŒ‘" prcnt="0%" ;;
+ "New") icon="πŸŒ‘" prcnt="0" ;;
"Waxing Crescent") icon="πŸŒ’" ;;
- "First Quarter") icon="πŸŒ“" prcnt="50%" ;;
+ "First Quarter") icon="πŸŒ“" prcnt="50" ;;
"Waxing Gibbous") icon="πŸŒ”" ;;
- "Full") icon="πŸŒ•" prcnt="100%" ;;
+ "Full") icon="πŸŒ•" prcnt="100" ;;
"Waning Gibbous") icon="πŸŒ–" ;;
- "Last Quarter") icon="πŸŒ—" prcnt="50%" ;;
+ "Last Quarter") icon="πŸŒ—" prcnt="50" ;;
"Waning Crescent") icon="🌘" ;;
*) echo errorrrr ;;
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"%