aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-11-06 17:09:22 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-11-06 17:09:22 +0100
commit2ab348bf85808d296cf74c7e7d5e402defb85e5b (patch)
tree6258d9b25cae53b75edf2e8b0c123cac45616ebc
parent38110ef852373765de0c738aa54587b9ee640389 (diff)
downloadscripts-2ab348bf85808d296cf74c7e7d5e402defb85e5b.tar.gz
scripts-2ab348bf85808d296cf74c7e7d5e402defb85e5b.zip
Created script for i3blocks weather module.
-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*}