https://github.com/skamsie/hs-weather
Weather menubar app for hammerspoon
https://github.com/skamsie/hs-weather
hammerspoon lua weather
Last synced: 4 months ago
JSON representation
Weather menubar app for hammerspoon
- Host: GitHub
- URL: https://github.com/skamsie/hs-weather
- Owner: skamsie
- Created: 2016-08-21T12:07:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-04-25T20:05:00.000Z (about 7 years ago)
- Last Synced: 2024-01-29T03:40:38.570Z (over 2 years ago)
- Topics: hammerspoon, lua, weather
- Language: Lua
- Size: 493 KB
- Stars: 17
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hs-weather
Weather menubar app for [hammerspoon](http://www.hammerspoon.org) users.
:warning: **DEPRECATED**
_Important EOL Notice: As of Thursday, Jan. 3, 2019, the weather.yahooapis.com and query.yahooapis.com for Yahoo Weather API will be retired.
To continue using our free Yahoo Weather APIs, use https://weather-ydn-yql.media.yahoo.com/forecastrss._
### Setup
1. Copy the repo to your hammerspoon folder.
```cp -r hs-weather ~/.hammerspoon```
2. Add this to your init.lua
```
local weather = require("hs-weather")
weather.start()
```
3. Modify config.json to suit your needs
- ```geolocation: true``` => if hammerspoon has location services enabled, will get weather for current location and the ```location``` parameter will be ignored
Now the weather should be shown in the menu bar.
[](https://postimg.org/image/rdj3soi8l/)
**NOTES**
- click updates weather
- hover shows last yahoo update for the location
- if right after opening hammerspoon it shows N/A, just click to retry (this happens because sometimes yahoo returns an empty response for the location)
- Config can also be passed as an argument to weather.start() e.g.
```
local weather = require("hs-weather")
weather.start({
geolocation = true,
units = 'F'
})
```
- Default refresh is 5 minutes
- Disable by calling ```weather.stop()```
### Credits
Weather data: [Yahoo Weather API](https://developer.yahoo.com/weather/). It does not require an api key.
Icons by RNS, Freepik, Vectors Market, Yannick at http://www.flaticon.com