1 2 3 4 5 6 7 8 9 10 11 12 13 14
widget = { plugin = 'fs', opts = { paths = {'/', '/home'}, }, cb = function(t) local res = {} for k, v in pairs(t) do table.insert(res, string.format('%s %.0f%%', k, (1 - v.avail / v.total) * 100)) end return res end, }