awful.rules: Rename switchtotag to switch_to_tags.
First of all, it select many tags, so there is an "s". Also, Awesome standardised naming to snake case in v4.0, but this was missed.
This commit is contained in:
parent
927e7b2796
commit
0ac99a5dc5
|
@ -134,7 +134,7 @@ function ewmh.activate(c, context, hints) -- luacheck: no unused args
|
|||
end
|
||||
|
||||
-- The rules use `switchtotag`. For consistency and code re-use, support it,
|
||||
-- but keep undocumented.
|
||||
-- but keep undocumented. --TODO v5 remove switchtotag
|
||||
if hints.switchtotag or hints.switch_to_tag or hints.switch_to_tags then
|
||||
atag.viewmore(c:tags(), c.screen, (not hints.switch_to_tags) and 0 or nil)
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- * honor_workarea
|
||||
-- * tag
|
||||
-- * new_tag
|
||||
-- * switchtotag
|
||||
-- * switch_to_tags (also called switchtotag)
|
||||
-- * focus
|
||||
-- * titlebars_enabled
|
||||
-- * callback
|
||||
|
@ -83,7 +83,7 @@ If you want to put Emacs on a specific tag at startup, and immediately switch
|
|||
to that tag you can add:
|
||||
|
||||
{ rule = { class = "Emacs" },
|
||||
properties = { tag = mytagobject, switchtotag = true } }
|
||||
properties = { tag = mytagobject, switch_to_tags = true } }
|
||||
|
||||
If you want to apply a custom callback to execute when a rule matched,
|
||||
for example to pause playing music from mpd when you start dosbox, you
|
||||
|
@ -477,7 +477,7 @@ rules.high_priority_properties = {}
|
|||
-- @tfield table awful.rules.delayed_properties
|
||||
-- By default, the table has the following functions:
|
||||
--
|
||||
-- * switchtotag
|
||||
-- * switch_to_tags
|
||||
rules.delayed_properties = {}
|
||||
|
||||
local force_ignore = {
|
||||
|
@ -511,11 +511,17 @@ function rules.high_priority_properties.tag(c, value, props)
|
|||
end
|
||||
end
|
||||
|
||||
function rules.delayed_properties.switchtotag(c, value)
|
||||
function rules.delayed_properties.switch_to_tags(c, value)
|
||||
if not value then return end
|
||||
atag.viewmore(c:tags(), c.screen)
|
||||
end
|
||||
|
||||
function rules.delayed_properties.switchtotag(c, value)
|
||||
gdebug.deprecate("Use switch_to_tags instead of switchtotag", {deprecated_in=5})
|
||||
|
||||
rules.delayed_properties.switch_to_tags(c, value)
|
||||
end
|
||||
|
||||
function rules.extra_properties.geometry(c, _, props)
|
||||
local cur_geo = c:geometry()
|
||||
|
||||
|
|
|
@ -292,11 +292,11 @@ assert(not awful.rules.add_rule_source("invalid_source", function()
|
|||
end, {"awful.rules"}, {"awful.spawn"}))
|
||||
gears.debug.print_warning = temp
|
||||
|
||||
-- Test tag and switchtotag
|
||||
-- Test tag and switch_to_tags
|
||||
test_rule {
|
||||
properties = {
|
||||
tag = "9",
|
||||
switchtotag = true
|
||||
tag = "9",
|
||||
switch_to_tags = true
|
||||
},
|
||||
test = function(class)
|
||||
local c = get_client_by_class(class)
|
||||
|
@ -311,8 +311,8 @@ test_rule {
|
|||
}
|
||||
test_rule {
|
||||
properties = {
|
||||
tag = "8",
|
||||
switchtotag = false
|
||||
tag = "8",
|
||||
switch_to_tags = false
|
||||
},
|
||||
test = function(class)
|
||||
local c = get_client_by_class(class)
|
||||
|
|
|
@ -72,7 +72,7 @@ local steps = {
|
|||
awful.screen.focused().tags[1]:view_only()
|
||||
|
||||
runner.add_to_default_rules({ rule = { class = "XTerm" },
|
||||
properties = { tag = "2", focus = true, switchtotag = true }})
|
||||
properties = { tag = "2", focus = true, switch_to_tags = true }})
|
||||
|
||||
awful.spawn("xterm")
|
||||
|
||||
|
|
Loading…
Reference in New Issue