summaryrefslogtreecommitdiff
path: root/weather-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2019-01-26 23:00:31 -0500
committerGitHub <noreply@github.com>2019-01-26 23:00:31 -0500
commitd767e3b8deda7d026090b50184fe5903a58b6103 (patch)
tree38a65ba22b0b9d6966055f2cac45dab5ec9acaaa /weather-widget
parentee396d7c5b45d0dea4160f5cef0f0bc81980dd1f (diff)
Update README.md
Diffstat (limited to 'weather-widget')
-rw-r--r--weather-widget/README.md44
1 files changed, 37 insertions, 7 deletions
diff --git a/weather-widget/README.md b/weather-widget/README.md
index 7573cff..8ca7cee 100644
--- a/weather-widget/README.md
+++ b/weather-widget/README.md
@@ -1,17 +1,47 @@
# Weather widget
-![Weather Widget](./weather-widget.png)
+![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](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder.
## Installation
- - install lua socket
-```bash
-$ sudo apt-get install lua-socket
-```
+1. Install lua socket - to make HTTP calls to get the weather information.
+
+ ```bash
+ $ sudo apt-get install lua-socket
+ ```
+
+1. Download json parser for lua from [github.com/rxi/json.lua](https://github.com/rxi/json.lua) and place it under **~/.config/awesome/** (don't forget to star a repo <i class="fa fa-github-alt"></i> ):
+
+ ```bash
+ wget -P ~/.config/awesome/ https://raw.githubusercontent.com/rxi/json.lua/master/json.lua
+ ```
+
+1. Clone this repo under **~/.config/awesome/**:
+
+ ```bash
+ git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/
+ ```
+
+1. Get Open Weather Map app id here: [openweathermap.org/appid](https://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.
+
+1. Require weather widget at the beginning of **rc.lua**:
+
+ ```lua
+ local weather_widget = require("awesome-wm-widgets.weather-widget.weather")
+ ```
+
+1. Add widget to the tasklist:
+
+ ```lua
+ s.mytasklist, -- Middle widget
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ ...
+ weather_widget,
+ ...
+ ```
- - download json parser for lua: https://github.com/rxi/json.lua
- - get Open Weather Map app id here: https://openweathermap.org/appid
You can read how it works in more details [here](http://pavelmakhov.com/2017/02/weather-widget-for-awesome-wm)