summaryrefslogtreecommitdiff
path: root/fs-widget
diff options
context:
space:
mode:
authorChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
committerChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
commita2eddcdfcd87976866f797b5ad2b795495d2e620 (patch)
treee3498520985e33915a211389951d6c0c971b972b /fs-widget
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
Add widget timeouts
Diffstat (limited to 'fs-widget')
-rw-r--r--fs-widget/fs-widget.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs-widget/fs-widget.lua b/fs-widget/fs-widget.lua
index 4640c50..343c9f3 100644
--- a/fs-widget/fs-widget.lua
+++ b/fs-widget/fs-widget.lua
@@ -9,6 +9,7 @@ local storage_bar_widget = {}
local function worker(args)
local args = args or {}
local mounts = args.mounts or {'/'}
+ local timeout = args.timeout or 60
storage_bar_widget = wibox.widget {
max_value = 100,
@@ -78,7 +79,7 @@ local function worker(args)
local disk_widget = wibox.container.margin(storage_bar_widget, 0, 0, 0, 0)
local disks = {}
- watch([[bash -c "df | tail -n +2"]], 60,
+ watch([[bash -c "df | tail -n +2"]], timeout,
function(widget, stdout)
for line in stdout:gmatch("[^\r\n$]+") do
local filesystem, size, used, avail, perc, mount =