awful.placement: Add various `stretch` aliases
Use the same convention as `align` aliases
This commit is contained in:
parent
7b7802f559
commit
19913ba62d
|
@ -627,6 +627,22 @@ function placement.stretch(d, args)
|
||||||
attach(d, placement["stretch_"..args.direction], args)
|
attach(d, placement["stretch_"..args.direction], args)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Add the alias functions
|
||||||
|
for _,v in ipairs {"left", "right", "up", "down"} do
|
||||||
|
placement["stretch_"..v] = function(d, args)
|
||||||
|
local new_args = setmetatable({direction = v}, {__index=args})
|
||||||
|
placement.stretch(d, new_args)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
---@DOC_awful_placement_stretch_left_EXAMPLE@
|
||||||
|
|
||||||
|
---@DOC_awful_placement_stretch_right_EXAMPLE@
|
||||||
|
|
||||||
|
---@DOC_awful_placement_stretch_up_EXAMPLE@
|
||||||
|
|
||||||
|
---@DOC_awful_placement_stretch_down_EXAMPLE@
|
||||||
|
|
||||||
return placement
|
return placement
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue