sx-layoutmgr
sx-layoutmgr is a plugin that adds layout algorithms to desktops.
Configuration
sx-layoutmgr reads the desired layout for each desktop from the
desktop information key “layout”.
Builtin layouts:
- floating
- The user is free to arrange the windows.
- max
- Maximize the currently focused window
- vert
- Stack the windows vertically
- horiz
- Stack the windows horizontally
Example:
'desktops.desktops': [
('desktop one', {'layout': 'vert'}),
('just another desktop', {'layout': 'floating'}),
('the third one!', {'layout': 'max'}),
]
Actions
-
layoutmgr.set_layout(name)
sets the layout of the currently active desktop to the layout name.
- Required parameters:
-
-
layoutmgr.cycle([offset=+1])
cycles through the available desktop layouts for the currently
active desktop.
- Required parameters:
-
-
class sxlayoutmgr.FloatingLayout(desktop)
do nothing.
-
layout()
-
class sxlayoutmgr.HorizLayout(desktop)
arrange windows horizontally with equal width
-
layout()
-
class sxlayoutmgr.Layout(desktop)
-
detach()
-
layout()
-
on_rearrange(desktop)
-
class sxlayoutmgr.MaxLayout(desktop)
make the focused window fill the screen
-
layout()
-
class sxlayoutmgr.SXLayoutMgr(app)
-
action_cycle(info)
cycle the layouts for the current desktop
- parameters:
- offset: int
- offset to cycle, defaults to +1
- needed:
- screen
-
action_set_layout(info)
set the layout of the current desktop.
- parameters:
- name: str
- identifier of the layout
- needed:
- screen
-
attach_layouter(desktop, layouter_cls)
- attach the layouter class layouter_cls to desktop.
That will overwrite any layouter that was
attached before.
-
on_ready(app)
-
register(layouter_cls)
-
class sxlayoutmgr.VertLayout(desktop)
arrange windows vertically with equal height
-
layout()