LSWT(1) General Commands Manual LSWT(1)

# [NAME](#NAME)

lswt - list Wayland toplevels

# [SYNOPSIS](#SYNOPSIS)

`lswt` \[**-j**] \[**--json**] \[**-c** *custom-format*] \[**--custom** *custom-format*]

`lswt` \[**-h**] \[**--help**]

`lswt` \[**-w**] \[**--watch**]

`lswt` \[**-v**] \[**--version**]

# [DESCRIPTION](#DESCRIPTION)

lswt lists all toplevels ("Windows") advertised by a Wayland server.

The default output prints the title and app-id the toplevels and - if available - their state in human readable form.

The **state** is a four wide character field, corresponding to the four possible toplevel states: maximized, minimized, activated and fullscreen. If one of these states is true for a toplevel, the respective character in the field is set to the first letter of the state name, otherwise it is -.

lswt provides two output formats intended to be machine parseable: JSON and CSV. If the CSV output is chosen, a custom format must be provided, which specifies the information about the toplevels lswt should print. The JSON output is versioned.

The information is querried from the Wayland server via one of the following protocols:

- ext-foreign-toplevel-list-v1 (preferred)
- wlr-foreign-toplevel-management-unstable-v1

As of now, only the ext- protocol supports unique toplevel IDs and only the wlr- protocol supports toplevel states.

lswt also supports a watch mode, which will run continuosly and log whenever toplevels change their app-id or title. The watch mode is incompatible with the JSON and CSV output formats.

# [OPTIONS](#OPTIONS)

**-h**, **--help**

Print help text and exit.

**-v**, **--version**

Print version and exit.

**-w**, **--watch**

Run in watch mode.

**-j**, **--json**

Output data in the JSON format.

**-c** *custom-format*, **--custom** *custom-format*

Output data in the CSV format. A custom format must be provided which specifies which information about the toplevels lswt should print. This format is a string where each character corresponds to one field. Fields can be specified multiple times. At least one field must be provided. The following fields are supported:

**CHARACTER** **FIELD** t title a app-id i unique identifier A activated? ("focused?") f fullscreen? m minimized? M maximized?

# [AUTHOR](#AUTHOR)

[Leon Henrik Plickat](mailto:leonhenrik.plickat@stud.uni-goettingen.de)

2024-05-17 git.sr.ht/~leon\_plickat/lswt

---

Document: lswt(1) from lswt 2.0.0-r0 (Chainguard OS)
