From 12c80e3977cd1a6093e864f4a8e1b0b05c9b7d2f Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 23 Mar 2016 23:56:28 -0400 Subject: [PATCH] awful.placement: Add `maximize` aliases Use the same conventions as `align` and `stretch` aliases --- lib/awful/placement.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index 12079961..8d6579d9 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -677,6 +677,19 @@ function placement.maximize(d, args) attach(d, placement.maximize, args) end +-- Add the alias functions +for _, v in ipairs {"vertically", "horizontally"} do + placement["maximize_"..v] = function(d2, args) + args = args or {} + local new_args = setmetatable({axis = v}, {__index=args}) + placement.maximize(d2, new_args) + end +end + +---@DOC_awful_placement_maximize_vertically_EXAMPLE@ + +---@DOC_awful_placement_maximize_horizontally_EXAMPLE@ + return placement -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80