diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 6cc5c1e..6940999 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -602,22 +602,18 @@ awful.rules.rules = { -- {{{ Signals -- signal function to execute when a new client appears. +local sloppyfocus_last = {c=nil} client.connect_signal("manage", function (c, startup) -- Enable sloppy focus - local sloppyfocus_last = {x=nil, y=nil, c=nil} client.connect_signal("mouse::enter", function(c) - local mcoords = mouse.coords() if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then + and awful.client.focus.filter(c) then -- Skip focusing the client if the mouse wasn't moved. - if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y) - and c ~= sloppyfocus_last.c then + if c ~= sloppyfocus_last.c then client.focus = c sloppyfocus_last.c = c end end - sloppyfocus_last.x = mcoords.x - sloppyfocus_last.y = mcoords.y end) local titlebars_enabled = false diff --git a/rc.lua.copland b/rc.lua.copland index 088fc34..5f45e14 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -673,22 +673,18 @@ awful.rules.rules = { -- {{{ Signals -- Signal function to execute when a new client appears. +local sloppyfocus_last = {c=nil} client.connect_signal("manage", function (c, startup) -- Enable sloppy focus - local sloppyfocus_last = {x=nil, y=nil, c=nil} client.connect_signal("mouse::enter", function(c) - local mcoords = mouse.coords() if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then + and awful.client.focus.filter(c) then -- Skip focusing the client if the mouse wasn't moved. - if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y) - and c ~= sloppyfocus_last.c then + if c ~= sloppyfocus_last.c then client.focus = c sloppyfocus_last.c = c end end - sloppyfocus_last.x = mcoords.x - sloppyfocus_last.y = mcoords.y end) local titlebars_enabled = true diff --git a/rc.lua.dremora b/rc.lua.dremora index 9125d17..15c01bf 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -602,22 +602,18 @@ awful.rules.rules = { -- {{{ Signals -- Signal function to execute when a new client appears. +local sloppyfocus_last = {c=nil} client.connect_signal("manage", function (c, startup) -- Enable sloppy focus - local sloppyfocus_last = {x=nil, y=nil, c=nil} client.connect_signal("mouse::enter", function(c) - local mcoords = mouse.coords() if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then + and awful.client.focus.filter(c) then -- Skip focusing the client if the mouse wasn't moved. - if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y) - and c ~= sloppyfocus_last.c then + if c ~= sloppyfocus_last.c then client.focus = c sloppyfocus_last.c = c end end - sloppyfocus_last.x = mcoords.x - sloppyfocus_last.y = mcoords.y end) local titlebars_enabled = true diff --git a/rc.lua.holo b/rc.lua.holo index c41d7c9..ece7296 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -735,22 +735,18 @@ awful.rules.rules = { -- {{{ Signals -- Signal function to execute when a new client appears. +local sloppyfocus_last = {c=nil} client.connect_signal("manage", function (c, startup) -- Enable sloppy focus - local sloppyfocus_last = {x=nil, y=nil, c=nil} client.connect_signal("mouse::enter", function(c) - local mcoords = mouse.coords() if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then + and awful.client.focus.filter(c) then -- Skip focusing the client if the mouse wasn't moved. - if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y) - and c ~= sloppyfocus_last.c then + if c ~= sloppyfocus_last.c then client.focus = c sloppyfocus_last.c = c end end - sloppyfocus_last.x = mcoords.x - sloppyfocus_last.y = mcoords.y end) local titlebars_enabled = false diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 9b47660..7e239e0 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -673,22 +673,18 @@ awful.rules.rules = { -- {{{ Signals -- signal function to execute when a new client appears. +local sloppyfocus_last = {c=nil} client.connect_signal("manage", function (c, startup) -- Enable sloppy focus - local sloppyfocus_last = {x=nil, y=nil, c=nil} client.connect_signal("mouse::enter", function(c) - local mcoords = mouse.coords() if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then + and awful.client.focus.filter(c) then -- Skip focusing the client if the mouse wasn't moved. - if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y) - and c ~= sloppyfocus_last.c then + if c ~= sloppyfocus_last.c then client.focus = c sloppyfocus_last.c = c end end - sloppyfocus_last.x = mcoords.x - sloppyfocus_last.y = mcoords.y end) local titlebars_enabled = false diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 7be3c81..ee4dd39 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -648,22 +648,18 @@ awful.rules.rules = { -- {{{ Signals -- signal function to execute when a new client appears. +local sloppyfocus_last = {c=nil} client.connect_signal("manage", function (c, startup) -- Enable sloppy focus - local sloppyfocus_last = {x=nil, y=nil, c=nil} client.connect_signal("mouse::enter", function(c) - local mcoords = mouse.coords() if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then + and awful.client.focus.filter(c) then -- Skip focusing the client if the mouse wasn't moved. - if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y) - and c ~= sloppyfocus_last.c then + if c ~= sloppyfocus_last.c then client.focus = c sloppyfocus_last.c = c end end - sloppyfocus_last.x = mcoords.x - sloppyfocus_last.y = mcoords.y end) local titlebars_enabled = false diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 02f8af7..1219788 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -600,22 +600,18 @@ awful.rules.rules = { -- {{{ Signals -- signal function to execute when a new client appears. +local sloppyfocus_last = {c=nil} client.connect_signal("manage", function (c, startup) -- Enable sloppy focus - local sloppyfocus_last = {x=nil, y=nil, c=nil} client.connect_signal("mouse::enter", function(c) - local mcoords = mouse.coords() if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then + and awful.client.focus.filter(c) then -- Skip focusing the client if the mouse wasn't moved. - if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y) - and c ~= sloppyfocus_last.c then + if c ~= sloppyfocus_last.c then client.focus = c sloppyfocus_last.c = c end end - sloppyfocus_last.x = mcoords.x - sloppyfocus_last.y = mcoords.y end) local titlebars_enabled = false diff --git a/rc.lua.steamburn b/rc.lua.steamburn index 70761ed..a116ac3 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -609,22 +609,18 @@ awful.rules.rules = { -- {{{ Signals -- signal function to execute when a new client appears. +local sloppyfocus_last = {c=nil} client.connect_signal("manage", function (c, startup) -- Enable sloppy focus - local sloppyfocus_last = {x=nil, y=nil, c=nil} client.connect_signal("mouse::enter", function(c) - local mcoords = mouse.coords() if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then + and awful.client.focus.filter(c) then -- Skip focusing the client if the mouse wasn't moved. - if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y) - and c ~= sloppyfocus_last.c then + if c ~= sloppyfocus_last.c then client.focus = c sloppyfocus_last.c = c end end - sloppyfocus_last.x = mcoords.x - sloppyfocus_last.y = mcoords.y end) local titlebars_enabled = false