Permalink
Browse files

Added notagsteal shifty.config.apps property.

  • Loading branch information...
1 parent 62ea299 commit 90911d6ea2fd729cf0fc68c4f408d13ea833f3ab Matthew Mawdsley committed Dec 27, 2012
Showing with 17 additions and 1 deletion.
  1. +17 −1 init.lua
View
@@ -459,7 +459,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
@@ -605,6 +605,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
@@ -698,6 +699,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

0 comments on commit 90911d6

Please sign in to comment.