]> git.rmz.io Git - dotfiles.git/blobdiff - conky/functions.lua
xdg: add user-dirs.dirs
[dotfiles.git] / conky / functions.lua
index 918914f8d65419b0379cbcc2e0e8af6a2578af7e..4f517027591389790522f7700ca8ad5432ecd9d4 100644 (file)
@@ -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"))
         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
             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"))
         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
             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
             end
         end
     end
+    dirs:close()
 
     newmail = ""
     local accounts = {"gmail"}
 
     newmail = ""
     local accounts = {"gmail"}