diff options
author | streetturtle <streetturtle@users.noreply.github.com> | 2020-09-21 20:53:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 20:53:22 -0400 |
commit | 31213af0082bef8344475dbeb84205f1a7e31c7d (patch) | |
tree | 2a8b4cad8363c5a0019466edf86d8ef99941d2f4 /batteryarc-widget | |
parent | a127ffe8efc8ccb91b7a8495c23f67278609df25 (diff) | |
parent | 21150bd640f086f617c61b32cde5e45ecfb5158f (diff) |
Merge pull request #188 from brucec5/widget-tweaks
Add customizable refresh timeouts to most widgets
Diffstat (limited to 'batteryarc-widget')
-rw-r--r-- | batteryarc-widget/README.md | 1 | ||||
-rw-r--r-- | batteryarc-widget/batteryarc.lua | 3 |
2 files changed, 3 insertions, 1 deletions
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/batteryarc-widget/batteryarc.lua b/batteryarc-widget/batteryarc.lua index 3e078eb..a4bb357 100644 --- a/batteryarc-widget/batteryarc.lua +++ b/batteryarc-widget/batteryarc.lua @@ -26,6 +26,7 @@ local function worker(args) local arc_thickness = args.arc_thickness or 2 local show_current_level = args.show_current_level or false local size = args.size or 18 + local timeout = args.timeout or 10 local main_color = args.main_color or beautiful.fg_color local bg_color = args.bg_color or '#ffffff11' @@ -114,7 +115,7 @@ local function worker(args) end end - watch("acpi", 10, update_widget, widget) + watch("acpi", timeout, update_widget, widget) -- Popup with battery info local notification |