awesome-wm-widgets/weather-widget
streetturtle 86ab5aea40
Update README.md
2019-01-29 15:55:56 -05:00
..
README.md Update README.md 2019-01-29 15:55:56 -05:00
weather-widget.png update screenshot 2017-03-14 21:56:27 -04:00
weather.lua Make temperature units customizable using the secrets.lua 2019-01-29 14:59:09 -05:00

README.md

Weather widget

Weather Widget

Note that widget uses the Arc icon theme, so it should be installed first under /usr/share/icons/Arc/ folder.

Installation

  1. Install lua socket - to make HTTP calls to get the weather information.

    $ sudo apt-get install lua-socket
    
  2. Download json parser for lua from github.com/rxi/json.lua and place it under ~/.config/awesome/ (don't forget to star a repo ):

    wget -P ~/.config/awesome/ https://raw.githubusercontent.com/rxi/json.lua/master/json.lua
    
  3. Clone this repo under ~/.config/awesome/:

    git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/
    
  4. Get Open Weather Map app id here: openweathermap.org/appid and place it in ~/.config/awesome/awesome-wm-widgets/secrets.lua, or directly in the widget. Don't forget to set also your city and units - C/F.

  5. Require weather widget at the beginning of rc.lua:

    local weather_widget = require("awesome-wm-widgets.weather-widget.weather")
    
  6. Add widget to the tasklist:

    s.mytasklist, -- Middle widget
        { -- Right widgets
            layout = wibox.layout.fixed.horizontal,
            ...
            weather_widget,
            ...
    

You can read how it works in more details here