aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xi3blocks/i3weather.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/i3blocks/i3weather.sh b/i3blocks/i3weather.sh
new file mode 100755
index 0000000..f304bbc
--- /dev/null
+++ b/i3blocks/i3weather.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# i3weather.sh (i3blocks weather module)
+#
+# Usage: i3weather.sh
+#
+# Prints a one-line current weather report
+
+#case $BLOCK_BUTTON in
+# 1) # Left click
+# 2) # Middle click
+# 3) # Right click
+#esac
+
+output="$(curl 'wttr.in/Oviedo?format=%c+%t+%p+%w' | sed 's/+//g')"
+echo ${output% k*}