1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-29 17:18:13 +01:00
eoli3n-dotfiles/.i3/weather.sh
2016-03-29 20:34:02 +02:00

17 lines
626 B
Bash
Executable File

#!/bin/bash
loc="34090"
mph=$(cliweather $loc| grep 'Wind:' | cut -d' ' -f2)
kmh=$(echo "$(($mph*(8/5)))" | cut -d'.' -f1)
#today_cond="$(cliweather $loc | grep 'Condition:' | sed 's-Condition: --')"
today_temp="$(cliweather $loc | grep 'Temperature:' | sed 's-Temperature: .*/\(.*C\)- \1°-')"
today_humi="$(cliweather $loc | grep 'Humidity:' | sed 's-Humidity: --')"
today_wind="$(cliweather $loc | grep 'Wind:' | sed "s-Wind: .* mph\( .*\)-"$kmh"km/h-")"
#today
echo $today_temp $today_humi $today_wind
#next days
#cliweather -f 34090 | head -n 9 | sed 's-Day: --' | sed 's- .*/\(.*C\)- \1°-' | sed 's-Condition: --'