[fs] reformat

This commit is contained in:
streetturtle 2021-06-12 22:22:15 -04:00
parent 2e2ae410de
commit 3a26ea67be
1 changed files with 96 additions and 97 deletions

View File

@ -81,8 +81,7 @@ local function worker(user_args)
watch([[bash -c "df | tail -n +2"]], timeout, watch([[bash -c "df | tail -n +2"]], timeout,
function(widget, stdout) function(widget, stdout)
for line in stdout:gmatch("[^\r\n$]+") do for line in stdout:gmatch("[^\r\n$]+") do
local filesystem, size, used, avail, perc, mount = local filesystem, size, used, avail, perc, mount = line:match('([%p%w]+)%s+([%d%w]+)%s+([%d%w]+)%s+([%d%w]+)%s+([%d]+)%%%s+([%p%w]+)')
line:match('([%p%w]+)%s+([%d%w]+)%s+([%d%w]+)%s+([%d%w]+)%s+([%d]+)%%%s+([%p%w]+)')
disks[mount] = {} disks[mount] = {}
disks[mount].filesystem = filesystem disks[mount].filesystem = filesystem