X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6f988d8eb76326d5f93ed110b4f42c6e8946ddd8..a89bbec6f39985515c33aa71dab1689f863b7851:/widgets/fs.lua diff --git a/widgets/fs.lua b/widgets/fs.lua index d5dd49a..b48fcd0 100644 --- a/widgets/fs.lua +++ b/widgets/fs.lua @@ -27,6 +27,7 @@ local fs = {} fs.unit = { ["mb"] = 1024, ["gb"] = 1024^2 } function fs.hide() + if not fs.notification then return end naughty.destroy(fs.notification) fs.notification = nil end @@ -98,7 +99,7 @@ local function worker(args) widget = fs.widget settings() - if notify == "on" and fs_now.used >= 99 and not helpers.get_map(partition) then + if notify == "on" and tonumber(fs_now.used) >= 99 and not helpers.get_map(partition) then naughty.notify({ title = "warning", text = partition .. " is empty!",