From 64ce84e3704fcff20e754348d48bb4fcd8de62f5 Mon Sep 17 00:00:00 2001 From: Xinhao Yuan Date: Sat, 20 Mar 2021 12:46:20 -0400 Subject: [PATCH] Make the placement example more concrete. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d195d9..5fd7e33 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,10 @@ For `new_placement_cb` the arguments are: The callback places the new client by changing its geometry and client data. Note that after the callback machi will validate the geometry and fit into the areas. So no need to set the `.area`, `.lu`, or `.rd` field of the client data in the callback. -See `placement.empty` in `layout.lua` for an example. +For example, to place new client in the largest area among empty areas, create the layout with +``` +machi.layout.create{ new_placement_cb = machi.layout.placement.empty } +``` ## The layout editor and commands