-
Notifications
You must be signed in to change notification settings - Fork 260
Weather
t-ui 6.7 introduced the new weather feature.
######## Actually this is in BETA ########
$ tuiweather -enable
$ tuiweather -disable
This happens because t-ui uses a free API to gather info about the weather in your area (I can't afford a paid service). But there's a limit, 60 requests per minute. So, if the maximum amount of requests have already been reached, you'll have to wait a minute, and so on, until you find a free slot.
- Open this link
- Sign up. You can use any email, any password, any username, you won't need them anymore
- Open the page "API keys" (or click on this link)
- Copy the first key, the alphanumeric sequence below the Key header
- Open t-ui, type
$ tuiweather -set_key
and paste your key - Restart t-ui
This happens because t-ui wasn't able to get your coords (your GPS sensor may be off or unavailable).
config -set weather_location [cityID OR coords]
-
[coords]
-> latitude and longitude with a comma between (45.6,13.7) -
[cityID]
-> your city ID, which you can find here
The current weather is stored with JSON. You can see an example here.
You can gather the information that you want inside t-ui with this format:
%[name]
For instance, if you want to know only the humidity level, you will change your format to:
%humidity
or better Humidity: %humidity%
The second example will appear like this:
Humidity: 56%
Since some %name
(like main) appear multiple times inside the JSON file, you can select the one you want with this format:
%[name][n]
For instance, this format selects the third main inside the file:
%main3
You can replace some portions of your weather to customize them.
For instance, let's say you want to change the weather label "Rain" to "Tears from the sky". This is how you would do it:
#[Rain/Tears from the sky]%description
You can color a piece of text with this format:
Weather: %main, Temperature: #991100[%temp]
More info here.
You can switch between Celsius and Fahrenheit using this special sequence:
Temp: %temp$(*1.8+32)
Francesco Andreuzzi, Italy, [email protected]