Add settings.force_odd_as_intrusive option
This commit is contained in:
parent
a235f864f7
commit
ebf360dae8
|
@ -197,6 +197,8 @@ Then edit this section to fit your needs.
|
||||||
| **default_layout** | The default layout for tags | layout |
|
| **default_layout** | The default layout for tags | layout |
|
||||||
| **group_children** | Add dialogs to the same tags as their parent client | boolean |
|
| **group_children** | Add dialogs to the same tags as their parent client | boolean |
|
||||||
| **mwfact** | The default master/slave ratio | float (0-1) |
|
| **mwfact** | The default master/slave ratio | float (0-1) |
|
||||||
|
| **force_odd_as_intrusive** | Make all non-normal (dock, splash) intrusive | boolean |
|
||||||
|
|
||||||
|
|
||||||
It's worth noting that some settings like `mwfact` and `default_layout` should
|
It's worth noting that some settings like `mwfact` and `default_layout` should
|
||||||
be set **before** the tag arrow. Otherwise they wont take effect at startup.
|
be set **before** the tag arrow. Otherwise they wont take effect at startup.
|
||||||
|
|
7
init.lua
7
init.lua
|
@ -13,6 +13,7 @@ local signals,module,class_client,tags_hash,settings,sn_callback = {
|
||||||
"exclusive" , "init" , "volatile" , "focus_new" , "instances" ,
|
"exclusive" , "init" , "volatile" , "focus_new" , "instances" ,
|
||||||
"match" , "class" , "spawn" , "position" , "force_screen" ,
|
"match" , "class" , "spawn" , "position" , "force_screen" ,
|
||||||
"max_clients" , "exec_once" , "clone_on" , "clone_of" , "no_focus_stealing",
|
"max_clients" , "exec_once" , "clone_on" , "clone_of" , "no_focus_stealing",
|
||||||
|
"shape_bounding",
|
||||||
},{},{},{},{},{}
|
},{},{},{},{},{}
|
||||||
|
|
||||||
for _,sig in ipairs(signals) do
|
for _,sig in ipairs(signals) do
|
||||||
|
@ -94,7 +95,7 @@ local function apply_properties(c,override,normal)
|
||||||
capi.client.focus = c
|
capi.client.focus = c
|
||||||
end
|
end
|
||||||
--Add to the current tag if the client is intrusive, ignore exclusive
|
--Add to the current tag if the client is intrusive, ignore exclusive
|
||||||
if prop.intrusive == true then
|
if prop.intrusive == true or (settings.force_odd_as_intrusive and c.type ~= "normal") then
|
||||||
local tag = awful.tag.selected(c.screen)
|
local tag = awful.tag.selected(c.screen)
|
||||||
if not tag then
|
if not tag then
|
||||||
awful.tag.viewonly(awful.tag.gettags(c.screen)[1])
|
awful.tag.viewonly(awful.tag.gettags(c.screen)[1])
|
||||||
|
@ -146,8 +147,8 @@ local function match_client(c, startup)
|
||||||
if awful.tag.getproperty(tags[1],"focus_new") ~= false and not (c.transient_for and settings.block_transient_for_focus_stealing)
|
if awful.tag.getproperty(tags[1],"focus_new") ~= false and not (c.transient_for and settings.block_transient_for_focus_stealing)
|
||||||
and not awful.tag.getproperty(tags[1],"no_focus_stealing") then
|
and not awful.tag.getproperty(tags[1],"no_focus_stealing") then
|
||||||
awful.tag.viewonly(tags[1])
|
awful.tag.viewonly(tags[1])
|
||||||
elseif awful.tag.getproperty(tags[1],"no_focus_stealing") then
|
-- elseif awful.tag.getproperty(tags[1],"no_focus_stealing") then
|
||||||
c.urgent = true
|
-- c.urgent = true --It is not Tyrannical job to decide if it is urgent or not
|
||||||
end
|
end
|
||||||
if not rules.properties.no_autofocus then
|
if not rules.properties.no_autofocus then
|
||||||
capi.client.focus = c
|
capi.client.focus = c
|
||||||
|
|
Loading…
Reference in New Issue