Module: cwc.container

Low-level API client container operation.

Info:

  • Copyright: 2024
  • License: GPLv3
  • Originally authored by: Dwi Asmoro Bangun
    (Full contributors list available on our github project)

Static module functions

cwc.container.get () -> cwc_container[] Get all containers in the server.
cwc.container.reset_mark () Reset mark.

Object properties

clients cwc_client[] Get clients in the container. Read only
front cwc_client Get the topmost client. Read only
geometry table Geometry of the container.
insert_mark boolean Mark container so that the next mapped toplevel would be inserted to it.

Object methods

:focusidx (idx) Navigate toplevel in the container.
:swap (container) Swap the toplevels inside the container.
:get_client_stack (reverse) -> cwc_client[] Get clients in the container ordered by the position in the scene.

Signals

container::new Emitted when a container is created.
container::destroy Emitted when a container is destroyed.
container::insert Emitted when a client is inserted to the container.
container::remove Emitted when a client is removed from the container.
container::swap Emitted when a container is swapped.


Static module functions

🔗 cwc.container.get () -> cwc_container[]
Get all containers in the server.

Returns:

    cwc_container[]
🔗 cwc.container.reset_mark ()
Reset mark.

Object properties

🔗 clients cwc_client[] · read only
Get clients in the container.

Ordered by time the toplevel inserted (first item is newest to oldest).

Constraints:

Default value : nil if empty.
Valid values : Array of clients.
🔗 front cwc_client · read only
Get the topmost client.

Constraints:

Default value : client in the top of the view.
Valid values : The client.
🔗 geometry table
Geometry of the container.

Constraints:

Default value : current container geometry with structure box structure.
Table keys:
x (integer)
y (integer)
width (integer)
height (integer)
🔗 insert_mark boolean
Mark container so that the next mapped toplevel would be inserted to it.

Constraints:

Default value : false
Valid values : Whether the container has insert mark.

See also:

reset_mark Reset mark. static module functions

Object methods

🔗 :focusidx (idx)
Navigate toplevel in the container.

Parameters:

Name Type(s) Description
idx integer Step relative to front client negative backward.
🔗 :swap (container)
Swap the toplevels inside the container.

Parameters:

Name Type(s) Description
container cwc_container Container to swap with this container.
🔗 :get_client_stack (reverse) -> cwc_client[]
Get clients in the container ordered by the position in the scene.

Parameters:

Name Type(s) Description
reverse boolean If true the order is bottom to front.

Returns:

    cwc_client[] clients Array of clients.

Signals

🔗 container::new
Emitted when a container is created.

Arguments:

Name Type(s) Description
cont cwc_container The container object.
🔗 container::destroy
Emitted when a container is destroyed.

Arguments:

Name Type(s) Description
cont cwc_container The container object.
🔗 container::insert
Emitted when a client is inserted to the container.

Arguments:

Name Type(s) Description
cont cwc_container The container object.
🔗 container::remove
Emitted when a client is removed from the container.

Arguments:

Name Type(s) Description
cont cwc_container The container object.
🔗 container::swap
Emitted when a container is swapped.

Arguments:

Name Type(s) Description
cont cwc_container The container object.
generated by LDoc 1.5.0 based on AwesomeWM template