-
Notifications
You must be signed in to change notification settings - Fork 23
Attach
In a tiling layout there are several ways that control or influence where a new window will appear within a layout, or more specifically within the list of clients.
Collectively these are referred to as attach methods and which one to use comes down to personal preference and what works best in the desired workflow. There are no right or wrong answers as to which attach method to use.
By default in dwm all new clients become the new master client, having more window area available, is based on the idea that if you open a new window then that is going to be what you are going to focus on next.
Other attach methods tend to avoid the master area in favour of secondary windows in the stack area.
Here are the available attach methods, refer to the individual pages for a visual cues:
Flag | Description |
---|---|
AttachMaster | Attach at the top of the master area |
AttachAside | Attach at the top of the stack area |
AttachBottom | Attach at the bottom of the stack area |
AttachAbove | Attach above the currently focused client |
AttachBelow | Attach below the currently focused client |
The default attach method can be set in config.h via the
attachdefault
variable:
static unsigned int attachdefault = AttachAside; // or AttachMaster, AttachAbove, AttachBelow, AttachBottom
The default attach method can also be set during runtime via the setattachdefault function.
The attach method can also be set on a per client basis for example to make sure that if, say, firefox spawns as the new master instead of what the default attach method is set to.
static const Rule clientrules[] = {
...
{ .class = "firefox", .workspace = "8", .flags = AttachMaster },
...
The attach methods mayb also be used internally within dusk. One example of this is how a client is explicitly added at the bottom of the stack when it it is being moved across workspaces.
Concepts | Configuration | Features | Flags | Functionality | Functions