aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-21 19:42:40 +0100
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-21 19:42:40 +0100
commit0174593f61937b58d21831bb97eeb0050040d783 (patch)
treef80d1aaa2cbf8a8c31ca7aad7fc5fb55ddd775fd /modules
parent08e1dfabba1d05a23e4a1f11bc7b42f65f1a319b (diff)
Added weather module variables
Diffstat (limited to 'modules')
-rw-r--r--modules/weather29
1 files changed, 19 insertions, 10 deletions
diff --git a/modules/weather b/modules/weather
index 21706bc..0933622 100644
--- a/modules/weather
+++ b/modules/weather
@@ -1,6 +1,15 @@
#!/bin/bash
# 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()
{
@@ -24,23 +33,23 @@ get_weather()
case $STATUS in
"Clear" )
- echo "";;
+ echo $SUN_ICON;;
"Clouds" )
- echo "摒";;
+ echo $CLOUD_ICON;;
"Rain" )
- echo "歹";;
+ echo $RAIN_ICON;;
"Thunderstorm" )
- echo "朗";;
+ echo $THUNDER_ICON;;
"Snow" )
- echo "流";;
+ echo $SNOW_ICON;;
"Mist" )
- echo "敖";;
+ echo $MIST_ICON;;
* )
- echo "?";;
- esac
+ echo "?";;
+ esac
- echo "$STATUS, "
- echo "$TEMP°C"
+ echo "$STATUS, "
+ echo "$TEMP°C"
}
get_weather