aboutsummaryrefslogtreecommitdiff
path: root/i3blocks/i3weather.sh
blob: ea4fb2769a3ff464be671f1041f5ac608f7de47c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# i3weather.sh (i3blocks weather module)
#
# Usage: i3weather.sh
#
# Prints a one-line current weather report

case $BLOCK_BUTTON in
	1) dunstify "$(curl wttr.in/?0qT)";;
	#2) # Middle click
	#3) # Right click
esac

output="$(curl 'wttr.in/Oviedo?format=%c+%t+%p+%w' | sed 's/+//g')"
echo ${output% k*}