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 /net-speed-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 'net-speed-widget')
-rw-r--r-- | net-speed-widget/net-speed.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net-speed-widget/net-speed.lua b/net-speed-widget/net-speed.lua index 5f81a18..846898c 100644 --- a/net-speed-widget/net-speed.lua +++ b/net-speed-widget/net-speed.lua @@ -96,6 +96,7 @@ local function worker(args) local args = args or {} local interface = args.interface or '*' + local timeout = args.timeout or 1 local update_widget = function(widget, stdout, stderr) @@ -119,7 +120,7 @@ local function worker(args) prev_tx = cur_tx end - watch(string.format([[bash -c "cat /sys/class/net/%s/statistics/*_bytes"]], interface), 1, update_widget, net_speed_widget) + watch(string.format([[bash -c "cat /sys/class/net/%s/statistics/*_bytes"]], interface), timeout, update_widget, net_speed_widget) return net_speed_widget |