mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-09 14:19:43 +00:00
Added weather module variables
This commit is contained in:
parent
08e1dfabba
commit
0174593f61
1 changed files with 19 additions and 10 deletions
|
@ -1,6 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Prints out the weather at your approximate location
|
# Prints out the weather at your approximate location
|
||||||
|
# Needs an internet connection
|
||||||
|
# Dependencies: jq
|
||||||
|
|
||||||
|
SUN_ICON=''
|
||||||
|
CLOUD_ICON='摒'
|
||||||
|
RAIN_ICON='歹'
|
||||||
|
THUNDER_ICON='朗'
|
||||||
|
SNOW_ICON='流'
|
||||||
|
MIST_ICON='敖'
|
||||||
|
|
||||||
get_weather()
|
get_weather()
|
||||||
{
|
{
|
||||||
|
@ -24,23 +33,23 @@ get_weather()
|
||||||
|
|
||||||
case $STATUS in
|
case $STATUS in
|
||||||
"Clear" )
|
"Clear" )
|
||||||
echo "";;
|
echo $SUN_ICON;;
|
||||||
"Clouds" )
|
"Clouds" )
|
||||||
echo "摒";;
|
echo $CLOUD_ICON;;
|
||||||
"Rain" )
|
"Rain" )
|
||||||
echo "歹";;
|
echo $RAIN_ICON;;
|
||||||
"Thunderstorm" )
|
"Thunderstorm" )
|
||||||
echo "朗";;
|
echo $THUNDER_ICON;;
|
||||||
"Snow" )
|
"Snow" )
|
||||||
echo "流";;
|
echo $SNOW_ICON;;
|
||||||
"Mist" )
|
"Mist" )
|
||||||
echo "敖";;
|
echo $MIST_ICON;;
|
||||||
* )
|
* )
|
||||||
echo "?";;
|
echo "?";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$STATUS, "
|
echo "$STATUS, "
|
||||||
echo "$TEMP°C"
|
echo "$TEMP°C"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_weather
|
get_weather
|
||||||
|
|
Loading…
Reference in a new issue