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 of lswt you'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 🌈
  • -c custom-format, --custom custom-format β€” output data in the CSV format. A custom format must be provided, and it 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:

  • t β€” title
  • a β€” app-id
  • i β€” unique identifier
  • A β€” 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 β€” m is minimized, M is 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 πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’