summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2019-05-04 21:03:13 -0400
committerstreetturtle <streetturtle@gmail.com>2019-05-04 21:03:13 -0400
commitcb394af13ab349ea3c99f6c8c6be208b276cc3a8 (patch)
treed6af524ac708f6efcbdff975b1ef3ddcd2655746
parent7df447fb50947f52758ce2f8a1168099551da36b (diff)
update readme of weather widget
-rw-r--r--weather-widget/README.md33
1 files changed, 31 insertions, 2 deletions
diff --git a/weather-widget/README.md b/weather-widget/README.md
index ef7282f..a7e67e5 100644
--- a/weather-widget/README.md
+++ b/weather-widget/README.md
@@ -4,6 +4,28 @@
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.
+## Customization
+
+It is possible to customize widget by providing a table with all or some of the following config parameters:
+
+| Name | Default | Description |
+|---|---|---|
+| `font` | `Play 9` | Font |
+| `city` | `Montreal,ca` | City name and country code, [more info](https://openweathermap.org/current) |
+| `api_key` | none| API key, required |
+| `units` | `metric` | `metric` for celsius, `imperial` for fahrenheit |
+
+### Example:
+
+```lua
+weather_widget({
+ api_key = 'your-api-key',
+ units = 'imperial',
+ font = 'Ubuntu Mono 9'
+}),
+```
+
+
## Installation
1. Install lua socket - to make HTTP calls to get the weather information.
@@ -24,7 +46,7 @@ Note that widget uses the Arc icon theme, so it should be [installed](https://gi
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 and units - C/F.
+1. Get Open Weather Map app id here: [openweathermap.org/appid](https://openweathermap.org/appid).
1. Require weather widget at the beginning of **rc.lua**:
@@ -39,7 +61,14 @@ Note that widget uses the Arc icon theme, so it should be [installed](https://gi
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
- weather_widget,
+ --default
+ weather_widget({api_key = 'your-api-key'}),
+ --customized
+ weather_widget({
+ api_key = 'your-api-key',
+ units = 'imperial',
+ font = 'Ubuntu Mono 9'
+ })
...
```