Package: layman
laymanlayman is a daemon that handles layout management on a per-workspace basis. EachWorkspaceLayoutManager(WLM) is
responsible for managing all of the tiling windows on a given workspace.WLMs are intended to have a simpler set of events than those provided though i3ipc-python, since the scope is limited
to a single workspace. See the User Created Layouts section for how to add a new layout.Usage: layman.py [options]

Options:
  -h, --help                   show this help message and exit
  -c .config/layman/config.toml, --config=.config/layman/config.toml
                               Path to user config file.InstallationI intend to provide installation through PyPi using pip, however the original name of this projectswlmwas forbidden for
being too similar to another package, swmm. After rebranding tolayman, the name is still forbidden for an unkown reason.
Until this is resolved, please use the instructions below.For Arch users,layman-gitis availableon the AURcourtesy ofmatclabInstalling from sourcegit clone https://github.com/frap129/layman
pip install ~/path/to/laymanto package and install layman. If you do not want to have to reinstall after a change, add --editable to the pip commandConfigurationlayman is configured using the config file at$HOME/.config/layman/config.toml. The[layman]table configures
options for layman, and defaults options for WLMs. Specific outputs and workspaces can be configured using[output.VALUE]or[workspace.VALUE]header, whereVALUEis the name of the output or the workspace number.
Any options configured will override the values set in the[layman]table for that output or workspace. For an example
configuration, see theconfig.tomlfile in the root of this repo.Note, values configured for outputs will only apply to workspacescreatedon that output.The config can be reloaded at runtime withnop layman reloadset on a bindsym. Note that this reloads the config, but
not the layout managers. Config changes for existing layouts won't take affect until the managers is reset withnop layman layout <layout short name>.Layout ManagersThe layout manager controlling a workspace can be changed using the commandnop layman layout <LAYOUT>. In order to
handle window movement in layouts that don't use standard up/down/left/right, a WLM can override these commands with better
defaults, and layman will fall back the regular command for WLMs that don't. To use the WLM provided movement commands,
replace yourmove <direction>bindsyms with# Override move binds
bindsym $mod+Shift+Left nop layman move left
bindsym $mod+Shift+Down nop layman move down
bindsym $mod+Shift+Up nop layman move up
bindsym $mod+Shift+Right nop layman move rightThesrc/mananagers/directoy contains files that each hold an implementation of a WLM, withWorkspaceLayoutManager.pycontaining the parent class from which all WLMs are derived.noneThenonelayout manager does not manage any windows. It exists as a reference implementation, and to allow users
to disable layout management on a given workspace.Binding:bindym <your bind here> nop layman layout none # disable layout management on a workspaceAutotilingBased on nwg-piotr'sautotiling,
theAutotilinglayout manager alternates between splith and splitv based on a windows height/width ratio.Config options:depthLimit: Max number of nested splits [0 means no limit]Binding:bindym <your bind here> nop layman layout Autotiling # set focused workspace's layout manager to AutotilingGridLike autotiling, Grid splits window based on width/height ratio. It differs from Autotiling by always splttting
the largest existing window, rather than the currently focused window. If multiple windows have the same size,
Grid tries to split the left-most and top-most "largest" window. This results in a grid-like pattern.Binding:bindym <your bind here> nop layman layout Grid # set focused workspace's layout manager to GridMasterStackMasterStackis inspired by dwm/dwl/river, but is my own take on it. It implements a master window with a stack
on the side. When a new window is created, it replaces master and master is placed on top of the stack.
If the master window is deleted, the top of the stack replaces master. The layout of the stack container can besplitv,tabbed, orstacking. The layout of the stack can be toggled using a keybind.MasterStackalso implements a keybind for swapping. When swapping, the focused window is swapped with master. If
the focused window is master, it gets swapped with the top of the stack.MasterStackalso implements rotation.
When rotating left, master is moved to the bottom of the stack, and the top of the stack becomes master.
Rotating right moves master to the top of the stack, and the bottom of the stack becomes master.MasterStackprovides overrides formove <directon>binds.Known bugs:Sometimes existing windows get missed when arranging an existing layoutConfig options:masterWidth: Int to control the percent width of master window [1-99]
stackLayout: String to control the layout of the stack ["splitv", "tabbed", "stacking"]
stackSide: String to control which side of the screen the stack is on ["right", "left"]Bindings:bindym <your bind here> nop layman layout MasterStack # set focused workspace's layout manager to MasterStack
bindym <your bind here> nop layman swap master # swap focused window with master
bindym <your bind here> nop layman rotate cw # rotate layout cw 1 window
bindym <your bind here> nop layman rotate ccw # rotate layout ccw 1 window
bindym <your bind here> nop layman move up # move focused winodw up 1 position in the stack
bindym <your bind here> nop layman move down # move focused window down one position in the stack
bindym <your bind here> nop layman stack toggle # toggles stack layout through splitv, tabbed, and stacking
bindym <your bind here> nop layman stackside toggle # toggles stack side between left and rightUser Created LayoutsYou can create layouts that get picked up and managed by layman without modifying layman itself. Any python file placed
in the same directory as the config file will be automatically imported by layman at startup, and any time the
configuration is reloaded. To get started writing your own layouts, take a look atsrc/mangers/WorkspaceLayoutManger.pyin this repo. This is the base class from which your layout must inherit, and provides a number of hooks and functions
for handling window events.src/managers/AutotilingLayoutManager.pyis a simple example of how to implement a WLM.
When making a WLM, make sure that it has a unique shortname.