diff --git a/Changes.md b/Changes.md index 403d325..3334c44 100644 --- a/Changes.md +++ b/Changes.md @@ -26,6 +26,11 @@ Fixed: - [pkg,weather,contrib/btc] Allow function call without Awesome - [pkg] Use more updated front-ends for Debian/Ubuntu (apt) and Fedora (dnf) +Removed: +- `helpers.sysctl` and `helpers.sysctl_table` were removed in favour of + `helpers.sysctl_async`. + + # Changes in 2.3.3 Feature: Add battery widget type for OpenBSD diff --git a/helpers.lua b/helpers.lua index 3ce5323..f99605c 100644 --- a/helpers.lua +++ b/helpers.lua @@ -226,44 +226,6 @@ function helpers.scroll(text, maxlen, widget) end -- }}} --- {{{ Return result from one sysctl variable as string -function helpers.sysctl(path) - local fd = io.popen("sysctl -n " .. helpers.shellquote(path)) - - if not fd then - return - end - - local ret = fd:read() - - fd:close() - - return ret -end --- }}} - --- {{{ Return result from multiple sysctl variables as table -function helpers.sysctl_table(syspath) - return setmetatable({ _path = syspath }, - { __index = function(table, index) - local path = "sysctl -n " .. helpers.shellquote(table._path .. "." .. index) - local f = io.popen(path) - if f then - local s = f:read("*all") - f:close() - if select(2, s:gsub("\n", "\n")) > 1 then - local o = { _path = path} - setmetatable(o, getmetatable(table)) - return o - else - return s - end - end - end - }) -end --- }}} - -- {{{ Return result from sysctl variable as table (async) function helpers.sysctl_async(path_table, parse) local ret = {}