LSWT(1)
π
LSWT(1) β the lswt girlies' guide
okay so this is the manual page for lswt, from the General Commands Manual section (section 1, bestie, we love a classic) π
β¨ NAME β¨
lswt β list Wayland toplevels. yes. that's the whole job. iconic behavior honestly π
π¦ SYNOPSIS π¦
lswt [-j] [--json] [-c custom-format] [--custom custom-format]
lswt [-h] [--help]
lswt [-w] [--watch]
lswt [-v] [--version]
πΈ DESCRIPTION πΈ
So lswt lists all the toplevels β that's "Windows" with a capital W, in quotes, the manpage said it not me β that a Wayland server is advertising. Like, it's just gonna tell you what windows exist. slay. πͺβ¨
The default output prints the title and app-id of the toplevels and β if it's available β their state, all in human readable form. very demure, very readable. π
Now the state thing, listen up, because this is the cute part: the state is a four wide character field, and it corresponds to the four possible toplevel states: maximized, minimized, activated and fullscreen. If one of those states is true for a toplevel, the respective character in the field gets set to the first letter of the state name. Otherwise? It's just -. so if you see dashes, that's a chill window with no state. π
lswt provides two output formats that are intended to be machine parseable: JSON and CSV. iykyk, machines gotta eat too π
If you choose the CSV output, you must provide a custom format, and that format specifies what information about the toplevels lswt should print. The JSON output is versioned. (yes, versioned. it has lore.)
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. so like... pick your fighter, you can't have both. π correct me if I'm wrong but I'm literally not, it's in the manpage.
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. no cap. don't try it. π«
π₯ OPTIONS π₯
-h,--helpβ print help text and exit. the "what does this do again" button π«Ά-v,--versionβ print version and exit. for when you need to know which era oflswtyou're living in β-w,--watchβ run in watch mode. it's giving surveillance but make it wholesome ππ-j,--jsonβ output data in the JSON format. curly braces bestie π-ccustom-format,--customcustom-format β output data in the CSV format. A custom format must be provided, and it specifies which information about the toplevelslswtshould 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:
tβ titleaβ app-idiβ unique identifierAβ activated? ("focused?") β yes both names, the manpage is bilingual like that β¨fβ fullscreen?mβ minimized?Mβ maximized?
β οΈ reminder bestie: at least one field is required, and uppercase vs lowercase matters βmis minimized,Mis maximized. do not mix those up. the vibe check will not save you here π
π§ AUTHOR π§
Leon Henrik Plickat β the main character who wrote this. we stan. π
and that's the page!! this one's from git.sr.ht/~leon_plickat/lswt and it's dated 2024-05-17 β so go list those toplevels, bestie, lswt is literally right there waiting for you πβ¨ππ¦πΈπ
π¦ where this page comes from
- alpine 3.24: lswt-doc 2.0.0-r0 Β· GPL-3.0-only
- nixos 26.05: lswt 2.0.0
- nixpkgs unstable: lswt 2.0.0
- opensuse-leap 16.0: lswt 2.0.0-bp160.1.9 Β· GPL-3.0-only
- opensuse-leap 16.0: lswt 2.0.0-bp160.1.9 Β· GPL-3.0-only
- opensuse-leap 16.0: lswt 2.0.0-bp160.1.9 Β· GPL-3.0-only
- opensuse-leap 16.0: lswt 2.0.0-bp160.1.9 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms