xkbion.lua from ion scripts collection works for me only with this patch:

--- xkbion.lua.orig     2008-12-20 02:43:25.000000000 +0300
+++ xkbion.lua  2008-12-20 02:48:24.000000000 +0300
@@ -149,7 +149,7 @@

     ioncore.get_hook("region_notify_hook"):add(
         function(reg, action)
-            if (tostring(reg.__typename) == "WClientWin") and (action == 
"activated") then
+            if (reg and tostring(reg.__typename) == "WClientWin") and (action == 
"activated") then
                 set_group(reg)
             end
         end
@@ -158,7 +158,7 @@
     local key = groups.key
     if key and type(key) == "string" then
         defbindings("WClientWin", {
-            kpress(key, function (_, _sub) set_group(_, true)  end, 
"_sub:WClientWin")
+            kpress(key, function (_, _sub) set_group(_, true)  end)
         })
     end

Without first change this error appeared:

Ion startup error log:
>> /home/citrin/.ion3/xkbion.lua:152: attempt to index local 'reg' (a nil value)
>> /home/citrin/.ion3/xkbion.lua:152: attempt to index local 'reg' (a nil value)

Without second change key binding don't work.

Why guard _sub:WClientWin was added?
_sub seems to be nil in most cases, when this key bind checked.

--
 Anton Yuzhaninov

Reply via email to