aboutsummaryrefslogtreecommitdiff
path: root/i3blocks/i3moon.sh
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-05-22 10:24:27 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2019-05-22 10:24:27 +0200
commitccc0247b0d25a7cfc1747ceca369d4386bdfbb21 (patch)
tree8515f32d972baa9e58f1053e67c10bd0031b5709 /i3blocks/i3moon.sh
parent339e3dac53099fecd2e54b9f557b15e2530618c3 (diff)
downloadscripts-ccc0247b0d25a7cfc1747ceca369d4386bdfbb21.tar.gz
scripts-ccc0247b0d25a7cfc1747ceca369d4386bdfbb21.zip
Renamed mailbox and moon scripts and added click to moon.
Diffstat (limited to 'i3blocks/i3moon.sh')
-rwxr-xr-xi3blocks/i3moon.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/i3blocks/i3moon.sh b/i3blocks/i3moon.sh
new file mode 100755
index 0000000..fcb45dc
--- /dev/null
+++ b/i3blocks/i3moon.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Shows an emoji with the phase of the moon
+
+pom | grep -q "New Moon" && 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 "Waning Gibbous" && moon=🌖
+pom | grep -q "Last Quarter" && moon=🌗
+pom | grep -q "Waning Crescent" && moon=🌘
+
+case $BLOCK_BUTTON in
+ 1) dunstify "$moon $(pom) $moon";;
+esac
+
+echo "$moon"
+