awful.rules: tag clients without flicker (FS#664)
We unregister the default awful.tag.withcurrent 'manage' signal handler and have awful.rules.apply handle initial client tagging. Signed-off-by: koniu <gkusnierz@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
5b8acee224
commit
5e7ddd1efa
|
@ -112,7 +112,7 @@ function apply(c)
|
||||||
if property == "floating" then
|
if property == "floating" then
|
||||||
aclient.floating.set(c, value)
|
aclient.floating.set(c, value)
|
||||||
elseif property == "tag" then
|
elseif property == "tag" then
|
||||||
aclient.movetotag(value, c)
|
c:tags({ value })
|
||||||
elseif property == "switchtotag" and value and props.tag then
|
elseif property == "switchtotag" and value and props.tag then
|
||||||
atag.viewonly(props.tag)
|
atag.viewonly(props.tag)
|
||||||
elseif property == "height" or property == "width" or
|
elseif property == "height" or property == "width" or
|
||||||
|
@ -127,6 +127,11 @@ function apply(c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- If untagged, stick the client on the current one.
|
||||||
|
if #c:tags() == 0 then
|
||||||
|
atag.withcurrent(c, startup)
|
||||||
|
end
|
||||||
|
|
||||||
-- Apply all callbacks from matched rules.
|
-- Apply all callbacks from matched rules.
|
||||||
for i, callback in pairs(callbacks) do
|
for i, callback in pairs(callbacks) do
|
||||||
callback(c)
|
callback(c)
|
||||||
|
@ -140,5 +145,6 @@ function apply(c)
|
||||||
end
|
end
|
||||||
|
|
||||||
client.add_signal("manage", apply)
|
client.add_signal("manage", apply)
|
||||||
|
client.remove_signal("manage", atag.withcurrent)
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue