1.5 KiB
1.5 KiB
layout |
---|
page |
Weather widget
![Weather Widget]({{'/assets/img/screenshots/weather-widget.png' | relative_url }}){:.center-image}
Note that widget uses the Arc icon theme, so it should be installed first under /usr/share/icons/Arc/ folder.
Installation
-
Install lua socket - to make HTTP calls to get the weather information.
$ sudo apt-get install lua-socket
-
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
-
Get Open Weather Map app id here: openweathermap.org/appid and place it in the widget's header.
-
Clone this repo under ~/.config/awesome/:
git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/
-
Require weather widget at the beginning of rc.lua:
local weather_widget = require("awesome-wm-widgets.weather-widget.weather")
-
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