02-01-2024, 05:25 AM
(05-14-2021, 01:33 AM)Uturn Wrote: sorry stupid question: How would I add more weather locations to the weather script, for example my home town Zurich, Switzerland? Thanks!
Maybe a bit late, you can just create your own userscript:
Install dependency
Code:
sudo apk install ansiweather
Code:
nano ~/.config/sxmo/userscripts/weather.sh
Code:
#!/bin/sh
#title="ansiweather"
# Edit to your town:
LOCATION=Qeshm
# This fetches the Weather info:
WEATHER="ansiweather -l $LOCATION -a false -d true | sed 's/-/\n-/g' | sed 's/^-//'"
# Open a new shell and execute the command
sxmo_terminal.sh -- bash -c "${WEATHER}; exec bash"
exit 0
Code:
sudo chmod +x ~/.config/sxmo/userscripts/weather.sh
Now you cen select from Scripts menu in sxmo