diff --git a/focus.lua b/focus.lua index 291951d..5662a84 100644 --- a/focus.lua +++ b/focus.lua @@ -187,7 +187,7 @@ local function bydirection(dir, c, swap,max) local old_src = capi.client.focus and capi.client.focus.screen capi.client.focus = cltbl[((not cl and #cltbl == 1) and 1 or target)] capi.client.focus:raise() - if old_src and capi.client.focus.screen ~= capi.screen[old_src] then + if not old_src or capi.client.focus.screen ~= capi.screen[old_src] then capi.mouse.coords(capi.client.focus:geometry()) end end diff --git a/init.lua b/init.lua index 633a980..80c88af 100644 --- a/init.lua +++ b/init.lua @@ -154,26 +154,26 @@ local function new(k) -- This have to be executer after rc.lua glib.idle_add(glib.PRIORITY_DEFAULT_IDLE, function() for k,v in pairs(keys) do - for _,key_nane in ipairs(v) do - aw[#aw+1] = awful.key({ "Mod4", }, key_nane, function () module.focus (k ) end, - { description = "Change focus to the "..key_nane, group = "Collision" }) - aw[#aw+1] = awful.key({ "Mod4", "Mod1" }, key_nane, function () module.resize(k ) end, - { description = "Resize to the "..key_nane, group = "Collision" }) - aw[#aw+1] = awful.key({ "Mod4", "Shift" }, key_nane, function () module.move (k ) end, - { description = "Move to the "..key_nane, group = "Collision" }) - aw[#aw+1] = awful.key({ "Mod4", "Shift", "Control" }, key_nane, function () module.move (k,nil ,true) end, + for _,key_name in ipairs(v) do + aw[#aw+1] = awful.key({ "Mod4", }, key_name, function () module.focus (k ) end, + { description = "Change focus to the "..key_name, group = "Collision" }) + aw[#aw+1] = awful.key({ "Mod4", "Mod1" }, key_name, function () module.resize(k ) end, + { description = "Resize to the "..key_name, group = "Collision" }) + aw[#aw+1] = awful.key({ "Mod4", "Shift" }, key_name, function () module.move (k ) end, + { description = "Move to the "..key_name, group = "Collision" }) + aw[#aw+1] = awful.key({ "Mod4", "Shift", "Control" }, key_name, function () module.move (k,nil ,true) end, { description = "", group = "Collision" }) - aw[#aw+1] = awful.key({ "Mod4", "Control" }, key_nane, function () module.focus (k,nil ,true) end, - { description = "Change floating focus to the "..key_nane, group = "Collision" }) - aw[#aw+1] = awful.key({ "Mod4", "Mod1" , "Control" }, key_nane, function () module.screen(k ) end, - { description = "Change screen to the "..key_nane, group = "Collision" }) - aw[#aw+1] = awful.key({ "Mod1", "Shift", "Control", "Mod4" }, key_nane, function () module.screen(k,true ) end, - { description = "Move tag screen to the "..key_nane, group = "Collision" }) + aw[#aw+1] = awful.key({ "Mod4", "Control" }, key_name, function () module.focus (k,nil ,true) end, + { description = "Change floating focus to the "..key_name, group = "Collision" }) + aw[#aw+1] = awful.key({ "Mod4", "Mod1" , "Control" }, key_name, function () module.screen(k ) end, + { description = "Change screen to the "..key_name, group = "Collision" }) + aw[#aw+1] = awful.key({ "Mod1", "Shift", "Control", "Mod4" }, key_name, function () module.screen(k,true ) end, + { description = "Move tag screen to the "..key_name, group = "Collision" }) if k == "left" or k =="right" then -- Conflict with my text editor, so I say no - aw[#aw+1] = awful.key({ "Mod1", "Control" }, key_nane, function () module.tag (k,nil ,true) end, - { description = "Select tag to the "..key_nane, group = "Collision" }) - aw[#aw+1] = awful.key({ "Mod1", "Shift", "Control" }, key_nane, function () module.tag (k,true,true) end, - { description = "Move tag to the "..key_nane, group = "Collision" }) + aw[#aw+1] = awful.key({ "Mod1", "Control" }, key_name, function () module.tag (k,nil ,true) end, + { description = "Select tag to the "..key_name, group = "Collision" }) + aw[#aw+1] = awful.key({ "Mod1", "Shift", "Control" }, key_name, function () module.tag (k,true,true) end, + { description = "Move tag to the "..key_name, group = "Collision" }) end end end