Skip to content

Commit

Permalink
Added notagsteal shifty.config.apps property.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmawdsleyhallnet committed Dec 27, 2012
1 parent 62ea299 commit 90911d6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion init.lua
Expand Up @@ -459,7 +459,7 @@ end
-- rc.lua -- rc.lua
--@param c : client to be matched --@param c : client to be matched
function match(c, startup) function match(c, startup)
local nopopup, intrusive, nofocus, run, slave local nopopup, intrusive, nofocus, run, slave, notagsteal
local wfact, struts, geom, float local wfact, struts, geom, float
local target_tag_names, target_tags = {}, {} local target_tag_names, target_tags = {}, {}
local typ = c.type local typ = c.type
Expand Down Expand Up @@ -605,6 +605,7 @@ function match(c, startup)
awful.client.property.set(c, kk, vv) awful.client.property.set(c, kk, vv)
end end
end end
if a.notagsteal ~= nil then notagsteal = a.notagsteal end
end end
end end
end end
Expand Down Expand Up @@ -698,6 +699,21 @@ function match(c, startup)
if geom then c:geometry(geom) end if geom then c:geometry(geom) end
if struts then c:struts(struts) 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 showtags = {}
local u = nil local u = nil
if #target_tags > 0 and not startup then if #target_tags > 0 and not startup then
Expand Down

0 comments on commit 90911d6

Please sign in to comment.