X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/229d2545dd399b52c6128a823657c6266fbbe8a9..a0da152bb39c5c3ae239a5743c40cb35038c4a21:/widgets/fs.lua?ds=inline 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",