X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/97546c0717e183d360a0375064130e20a7682990..d4b51f09d83f75a663c5711af77e0e6da40764a9:/conky/functions.lua diff --git a/conky/functions.lua b/conky/functions.lua index 918914f..4f51702 100644 --- a/conky/functions.lua +++ b/conky/functions.lua @@ -49,6 +49,7 @@ function conky_mail() if line:sub(-3) == 'new' then local new = io.popen("find " .. line .. " -type f -not -name '.*' -printf a") cnt_new = string.len(new:read("*all")) + new:close() if cnt_new > 0 then boxes[acc][box]['cnt_new'] = string.format("${color e6db74}%5d${color}", cnt_new) else @@ -57,6 +58,7 @@ function conky_mail() elseif line:sub(-3) == 'cur' then local old = io.popen("find " .. line .. " -type f -not -name '*:2,*S*' -printf a") cnt_old = string.len(old:read("*all")) + old:close() if cnt_old > 0 then boxes[acc][box]['cnt_old'] = string.format("${color fd971f}%2d${color}", cnt_old) else @@ -64,6 +66,7 @@ function conky_mail() end end end + dirs:close() newmail = "" local accounts = {"gmail"}