X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6cce5b6fe11fe8c69b08140d645c604fef59e42a..58b2a122dd20cc4d1d15a29a27e618c9c88050cc:/widgets/contrib/kbdlayout.lua?ds=inline diff --git a/widgets/contrib/kbdlayout.lua b/widgets/contrib/kbdlayout.lua index 3b514c5..8132c77 100644 --- a/widgets/contrib/kbdlayout.lua +++ b/widgets/contrib/kbdlayout.lua @@ -38,8 +38,7 @@ local function worker(args) end function kbdlayout.update() - helpers.async(string.format("%s -c 'setxkbmap -query'", awful.util.shell), - function(status) + helpers.async("setxkbmap -query", function(status) kbd_run_settings(string.match(status, "layout:%s*([^\n]*)"), string.match(status, "variant:%s*([^\n]*)")) end) @@ -73,7 +72,7 @@ local function worker(args) helpers.newtimer("kbdlayout", timeout, kbdlayout.update) - return setmetatable(kbdlayout, { __index = kbdlayout.widget }) + return kbdlayout end return setmetatable({}, { __call = function (_, ...) return worker(...) end })