Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #17 from mmawdsley/master

Added config option for preventing new clients from stealing focus if they are not on the current tag
  • Loading branch information...
commit 5c9627401ad6c77a93dcf1137df379bd63692e61 2 parents cfedaf4 + 90911d6
@bioe007 authored
Showing with 17 additions and 1 deletion.
  1. +17 −1 init.lua
View
18 init.lua
@@ -462,7 +462,7 @@ end
-- rc.lua
--@param c : client to be matched
function match(c, startup)
- local nopopup, intrusive, nofocus, run, slave
+ local nopopup, intrusive, nofocus, run, slave, notagsteal
local wfact, struts, geom, float
local target_tag_names, target_tags = {}, {}
local typ = c.type
@@ -608,6 +608,7 @@ function match(c, startup)
awful.client.property.set(c, kk, vv)
end
end
+ if a.notagsteal ~= nil then notagsteal = a.notagsteal end
end
end
end
@@ -701,6 +702,21 @@ function match(c, startup)
if geom then c:geometry(geom) end
if struts then c:struts(struts) end
+ -- prevent the client from stealing focus if it is on another tag
+ if notagsteal then
+ nofocus = true
+ nopopup = true
+
+ for i, t1 in ipairs(target_tags) do
+ for j, t2 in ipairs(sel) do
+ if t1 == t2 then
+ nofocus = false
+ nopopup = false
+ end
+ end
+ end
+ end
+
local showtags = {}
local u = nil
if #target_tags > 0 and not startup then
Please sign in to comment.
Something went wrong with that request. Please try again.