X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/1400e906708e907c268a37726a2c9852c4941377..b1a089633c0f1ac951c754b2e67b194b7f733413:/widgets/fs.lua diff --git a/widgets/fs.lua b/widgets/fs.lua index c78b6cb..ec87191 100644 --- a/widgets/fs.lua +++ b/widgets/fs.lua @@ -71,7 +71,7 @@ local function worker(args) function fs.update() fs_info, fs_now = {}, {} - helpers.async({ shell, "-c", "LC_ALL=C df -k --output=target,size,used,avail,pcent" }, function(f) + helpers.async({ shell, "-c", "/usr/bin/env LC_ALL=C df -k --output=target,size,used,avail,pcent" }, function(f) for line in string.gmatch(f, "\n[^\n]+") do local m,s,u,a,p = string.match(line, "(/.-%s).-(%d+).-(%d+).-(%d+).-([%d]+)%%") m = m:gsub(" ", "") -- clean target from any whitespace @@ -99,7 +99,7 @@ local function worker(args) widget = fs.widget settings() - if notify == "on" and tonumber(fs_now.used) >= 99 and not helpers.get_map(partition) then + if notify == "on" and #fs_now.used > 0 and tonumber(fs_now.used) >= 99 and not helpers.get_map(partition) then naughty.notify({ preset = naughty.config.presets.critical, title = "Warning",