From a2eddcdfcd87976866f797b5ad2b795495d2e620 Mon Sep 17 00:00:00 2001 From: Chris Bruce Date: Sat, 19 Sep 2020 01:08:15 -0700 Subject: Add widget timeouts --- weather-widget/weather.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'weather-widget') diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua index ba5b4f3..3d3b8e0 100644 --- a/weather-widget/weather.lua +++ b/weather-widget/weather.lua @@ -137,6 +137,7 @@ local function worker(args) local show_daily_forecast = args.show_daily_forecast local icon_pack_name = args.icons or 'weather-underground-icons' local icons_extension = args.icons_extension or '.png' + local timeout = args.timeout or 120 local owm_one_cal_api = ('https://api.openweathermap.org/data/2.5/onecall' .. @@ -457,7 +458,7 @@ local function worker(args) watch( string.format(GET_FORECAST_CMD, owm_one_cal_api), - 120, -- API limit is 1k req/day; day has 1440 min; every 2 min is good + timeout, -- API limit is 1k req/day; day has 1440 min; every 2 min is good update_widget, weather_widget ) -- cgit v1.2.3 From 21150bd640f086f617c61b32cde5e45ecfb5158f Mon Sep 17 00:00:00 2001 From: Chris Bruce Date: Sat, 19 Sep 2020 01:22:27 -0700 Subject: Update readmes to include timeout arg --- battery-widget/README.md | 1 + batteryarc-widget/README.md | 1 + bitbucket-widget/README.md | 1 + brightness-widget/README.md | 1 + brightnessarc-widget/README.md | 1 + cpu-widget/README.md | 1 + gerrit-widget/README.md | 1 + jira-widget/README.md | 1 + spotify-widget/README.md | 1 + stackoverflow-widget/README.md | 1 + volumearc-widget/README.md | 1 + volumebar-widget/README.md | 3 ++- weather-widget/README.md | 1 + 13 files changed, 14 insertions(+), 1 deletion(-) (limited to 'weather-widget') diff --git a/battery-widget/README.md b/battery-widget/README.md index 4ea14d8..9af7a4c 100644 --- a/battery-widget/README.md +++ b/battery-widget/README.md @@ -28,6 +28,7 @@ It is possible to customize widget by providing a table with all or some of the | `margin_left`|0| The left margin of the widget| | `display_notification` | `false` | Display a notification on mouseover | | `notification_position` | `top_right` | The notification position | +| `timeout` | 10 | How often in seconds the widget refreshes | | `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup | | `warning_msg_text` | _Battery is dying_ | Text of the warning popup | | `warning_msg_position` | `bottom_right` | Position of the warning popup | diff --git a/batteryarc-widget/README.md b/batteryarc-widget/README.md index 813c1af..de9255c 100644 --- a/batteryarc-widget/README.md +++ b/batteryarc-widget/README.md @@ -25,6 +25,7 @@ It is possible to customize widget by providing a table with all or some of the | `arc_thickness` | 2 | Thickness of the arc | | `show_current_level`| false | Show current charge level | | `size`| 18 | Size of the widget | +| `timeout` | 10 | How often in seconds the widget refreshes | | `main_color` | `beautiful.fg_color` | Color of the text with the current charge level and the arc | | `bg_color` | `#ffffff11` | Color of the charge level background | | `low_level_color` | `#e53935` | Arc color when battery charge is less that 15% | diff --git a/bitbucket-widget/README.md b/bitbucket-widget/README.md index fbd21b1..a0cae0a 100644 --- a/bitbucket-widget/README.md +++ b/bitbucket-widget/README.md @@ -19,6 +19,7 @@ It is possible to customize widget by providing a table with all or some of the | `uuid` | Required | UUID | | `workspace` | Required | Workspace ID| | `repo_slug` | Required | Repository slug | +| `timeout` | 60 | How often in seconds the widget refreshes | ## Installation diff --git a/brightness-widget/README.md b/brightness-widget/README.md index 0db5884..02aa2d3 100644 --- a/brightness-widget/README.md +++ b/brightness-widget/README.md @@ -13,6 +13,7 @@ It is possible to customize widget by providing a table with all or some of the | `dec_brightness_cmd` | `light -U 5`| Decrease brightness | | `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon | | `font` | `Play 9` | Font | +| `timeout` | 1 | How often in seconds the widget refreshes | ### Example: diff --git a/brightnessarc-widget/README.md b/brightnessarc-widget/README.md index 5049e65..c27f366 100644 --- a/brightnessarc-widget/README.md +++ b/brightnessarc-widget/README.md @@ -14,6 +14,7 @@ It is possible to customize widget by providing a table with all or some of the | `color` | `beautiful.fg_color` | Color of the arc | | `bg_color` | `#ffffff11` | Color of the arc's background | | `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon | +| `timeout` | 1 | How often in seconds the widget refreshes | ### Example: diff --git a/cpu-widget/README.md b/cpu-widget/README.md index 35e0eeb..8c4528c 100644 --- a/cpu-widget/README.md +++ b/cpu-widget/README.md @@ -28,6 +28,7 @@ It is possible to customize widget by providing a table with all or some of the | `color` | `beautiful.fg_normal` | Color of the graph | | `enable_kill_button` | `false` | Show button which kills the process | | `process_info_max_length` | `-1` | Truncate the process information. Some processes may have a very long list of parameters which won't fit in the screen, this options allows to truncate it to the given length. | +| `timeout` | 1 | How often in seconds the widget refreshes | ### Example diff --git a/gerrit-widget/README.md b/gerrit-widget/README.md index d867896..62c89a1 100644 --- a/gerrit-widget/README.md +++ b/gerrit-widget/README.md @@ -23,6 +23,7 @@ It is possible to customize widget by providing a table with all or some of the | `icon`| `/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg`| Path to the icon | | `host` | Required | Ex https://gerrit.tmnt.com | | `query` | `is:reviewer AND status:open AND NOT is:wip` | Query to retrieve reviews | +| `timeout` | 10 | How often in seconds the widget refreshes | ## Prerequisite diff --git a/jira-widget/README.md b/jira-widget/README.md index 5498085..04c7a2e 100644 --- a/jira-widget/README.md +++ b/jira-widget/README.md @@ -19,6 +19,7 @@ It is possible to customize widget by providing a table with all or some of the | `host` | Required | Ex: _http://jira.tmnt.com_ | | `query` | `jql=assignee=currentuser() AND resolution=Unresolved` | JQL query | | `icon` | `~/.config/awesome/awesome-wm-widgets/jira-widget/jira-mark-gradient-blue.svg` | Path to the icon | +| `timeout` | 10 | How often in seconds the widget refreshes | ## Installation diff --git a/spotify-widget/README.md b/spotify-widget/README.md index e52e58f..2ae8dfc 100644 --- a/spotify-widget/README.md +++ b/spotify-widget/README.md @@ -33,6 +33,7 @@ It is possible to customize widget by providing a table with all or some of the | `dim_opacity` | `0.2` | Widget's opacity when dimmed, `dim_when_paused` should be set to `true` | | `max_length` | `15` | Maximum lentgh of artist and title names. Text will be ellipsized if longer. | | `show_tooltip` | `true`| Show tooltip on hover with information about the playing song | +| `timeout` | 1 | How often in seconds the widget refreshes | ### Example: diff --git a/stackoverflow-widget/README.md b/stackoverflow-widget/README.md index 23ed2c1..0098062 100644 --- a/stackoverflow-widget/README.md +++ b/stackoverflow-widget/README.md @@ -13,6 +13,7 @@ It is possible to customize widget by providing a table with all or some of the | `icon`| `/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg` | Path to the icon | | `limit` | 5 | Number of items to show in the widget | | `tagged` | awesome-wm | Tag, or comma-separated tags | +| `timeout` | 300 | How often in seconds the widget refreshes | ## Installation diff --git a/volumearc-widget/README.md b/volumearc-widget/README.md index ce5c95a..496797e 100644 --- a/volumearc-widget/README.md +++ b/volumearc-widget/README.md @@ -21,6 +21,7 @@ It is possible to customize widget by providing a table with all or some of the | `path_to_icon` | /usr/share/icons/Arc/status/symbolic/audio-volume-muted-symbolic.svg | Path to the icon | | `thickness` | 2 | The arc thickness | | `height` | `beautiful.fg_normal` | Widget height | +| `timeout` | 1 | How often in seconds the widget refreshes | | `get_volume_cmd` | `amixer -D pulse sget Master` | Get current volume level | | `inc_volume_cmd` | `amixer -D pulse sset Master 5%+` | Increase volume level | | `dec_volume_cmd` | `amixer -D pulse sset Master 5%-` | Decrease volume level | diff --git a/volumebar-widget/README.md b/volumebar-widget/README.md index b4a4578..305b254 100644 --- a/volumebar-widget/README.md +++ b/volumebar-widget/README.md @@ -20,7 +20,8 @@ It is possible to customize widget by providing a table with all or some of the | `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | | `width` | 50 | The bar width | | `shape` | `bar` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | -| `margin` | `10` | Top and bottom margin (if your wibar is 22 px high, bar will be 2 px (22 - 2*10)) | +| `margins` | `10` | Top and bottom margin (if your wibar is 22 px high, bar will be 2 px (22 - 2*10)) | +| `timeout` | 1 | How often in seconds the widget refreshes | | `get_volume_cmd` | `amixer -D pulse sget Master` | Get current volume level | | `inc_volume_cmd` | `amixer -D pulse sset Master 5%+` | Increase volume level | | `dec_volume_cmd` | `amixer -D pulse sset Master 5%-` | Decrease volume level | diff --git a/weather-widget/README.md b/weather-widget/README.md index 7410ae0..e573bd4 100644 --- a/weather-widget/README.md +++ b/weather-widget/README.md @@ -30,6 +30,7 @@ It is possible to customize widget by providing a table with all or some of the | show_daily_forecast | false | Show daily forecast section | | icon_pack_name | weather-underground-icons | Name of the icon pack, could be `weather-underground-icon` or `VitalyGorbachev` or create your own, more details below | | icons_extension | `.svg` | File extension of icons in the pack | +| timeout | 120 | How often in seconds the widget refreshes | ### Icons: -- cgit v1.2.3