max depth

This commit is contained in:
Xinhao Yuan 2019-08-10 13:33:00 -04:00
parent c8d2b5fd45
commit ec9507b766
2 changed files with 10 additions and 2 deletions

View File

@ -51,7 +51,7 @@ To edit the layout `l` on screen `s`, call `editor.start_interactive(s = awful.s
### Basic usage
The editing command starts with the open region of the entire workarea, perform "operations" to split the current region into multiple sub-regions, then recursively edits each of them.
The editing command starts with the open region of the entire workarea, perform "operations" to split the current region into multiple sub-regions, then recursively edits each of them (by default, the maximum split depth is 2).
The layout is defined by a sequence of operations as a layout command.
The layout editor allows users to interactively input their commands and shows the resulting layouts on screen, with the following auxiliary functions:
@ -71,7 +71,7 @@ There are three kinds of operations:
2. Operations taking argument string as a single number.
`s` (shifting active region)
`s` (shifting active region), `p` (setting the maximum split depth)
3. Operation not taking argument.

View File

@ -526,6 +526,13 @@ local function create(data)
end
end
elseif method == "t" then
local n = tonumber(arg_str)
if n ~= nil then
max_depth = n
end
elseif method == "-" then
push_area()
@ -560,6 +567,7 @@ local function create(data)
["w"] = 2, ["W"] = 2,
["d"] = 2, ["D"] = 2,
["s"] = 2, ["S"] = 2,
["t"] = 2, ["T"] = 2,
["-"] = 1,
["."] = 1,
[";"] = 1,