dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 8d4a021f3741a728f5b1aa7e0b406e43ff79b039
parent 4acbbc07d35a16e2dd680fb44a0f4eaeb1756802
Author: nerrufam <58603397+nerrufam@users.noreply.github.com>
Date:   Thu, 13 Feb 2020 13:38:29 +0100

know the phase of the moon with emoji and % (#482)

8 emoji for 8 main phases plus the % 'of full'
😉 dont forget to load it to your status bar
Diffstat:
A.local/bin/statusbar/moonphase | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/.local/bin/statusbar/moonphase b/.local/bin/statusbar/moonphase @@ -0,0 +1,18 @@ +#!/bin/sh + +mnphs=$(pom | grep -io 'new\|waxing cresent\|first quarter\|waxing gibbous\|full\|waning gibbous\|last quarter\|waning cresent' | grep -m1 '.') +prcnt=$(pom | grep -o '..%') + +case $mnphs in + "New") icon="🌑" ;; + "Waxing Cresent") icon="🌒" ;; + "First Quarter") icon="🌓" ;; + "Waxing Gibbous") icon="🌔" ;; + "Full") icon="🌕" ;; + "Waning Gibbous") icon="🌖" ;; + "Last Quarter") icon="🌗" ;; + "Waning Cresent") icon="🌘" ;; + *) echo errorrrr ;; +esac + +printf "%s %s\\n" "$icon" "$prcnt"