Skip to content

fork-my-spoons/weather.spoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather

GitHub issues GitHub all releases GitHub release (latest by date)

A menubar app which shows current weather for a given location:

When clicked, a menu with more detailed information is shown, it also includes the sunrise and sunset times.

Installation

This app is using OpenWeather as the data provider, so first you need to create an account and get an app id in order to use the API. Then

  • install Hammerspoon - a powerful automation tool for OS X
    • Manually:

      Download the latest release, and drag Hammerspoon.app from your Downloads folder to Applications.

    • Homebrew:

      brew install hammerspoon --cask

  • download weather.spoon, unzip and double click on a .spoon file. It will be installed under ~/.hammerspoon/Spoons folder.
  • open ~/.hammerspoon/init.lua and add the following snippet:
-- weather
hs.loadSpoon('weather')
spoon.weather:setup{
  app_id = '<your app id>',
  -- units = 'f',
  lat = 45.501670,
  lon = -73.567221,
--   city = 'Montreal,QC,CA'
}
spoon.weather:start()

By defaul the temperature is in celsius, to change it to fahrenheit add parameter units with value 'f'. For the location you can either use latitude and longtitude, or city name.

This app uses icons, to properly display them, install a feather-font by downloading this .ttf font and installing it.