ewmh_m2m package

Submodules

ewmh_m2m.geometry module

class ewmh_m2m.geometry.Geometry(x: float = 0, y: float = 0, w: float = 0, h: float = 0)[source]

Bases: object

Data class to manipulate rectangles defined as (x, y, w, h)

build_absolute(container)[source]

Build a new Geometry, representing self, which is relative to container

build_relative(container)[source]

Build a new Geometry, representing self, relative to the “parent” container

property center: Geometry
directions_to(other: Geometry) Collection[Ordinal][source]

ewmh_m2m.ordinal module

class ewmh_m2m.ordinal.Ordinal(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

EAST = 0.0
EAST_NORTHEAST = 22.5
EAST_SOUTHEAST = 337.5
NORTH = 90.0
NORTHEAST = 45.0
NORTHWEST = 135.0
NORTH_NORTHEAST = 67.5
NORTH_NORTHWEST = 112.5
SOUTH = 270.0
SOUTHEAST = 315.0
SOUTHWEST = 225.0
SOUTH_SOUTHEAST = 292.5
SOUTH_SOUTHWEST = 247.5
WEST = 180.0
WEST_NORTHWEST = 157.5
WEST_SOUTHWEST = 202.5
property opposite

ewmh_m2m.screen module

ewmh_m2m.screen.get_screens() Set[Geometry][source]

Get the list of active screens. Its geometry represents each screen.

ewmh_m2m.screen.get_sibling_screen(siblings: Dict[Ordinal, List[Geometry]], direction: Ordinal, no_wrap: bool) Geometry | None[source]
ewmh_m2m.screen.get_sibling_screens(current: Geometry, screens: Iterable[Geometry]) Dict[Ordinal, List[Geometry]][source]

Given a screen and the list of active screens, return the sibling ones.

Each list is ordered from the nearest screen to the furthest one.

ewmh_m2m.window module

class ewmh_m2m.window.ActiveWindow[source]

Bases: object

Class to manage the currently active window.

property fullscreen: bool

Is the window in fullscreen mode

property geometry: Geometry

Geometry of the window

property maximized: Tuple[bool, bool]

Is the window maximized. Returns a boolean 2-tuple: (horizontally maximized?, vertically maximized?).

movable()[source]

Context manager to prepare the window to be moved.

Module contents