COWREARRANGE(1)

πŸ“¦ version 0.3, in fedora 44

πŸ’– cowrearrange β€” ok bestie, let's fix ur desk πŸ’–

cowrearrange(1) β€” it's the cow family's little layout gremlin, and it lives in section 1 of the manual. It tiles or cascades the windows on a given desk, and honestly? It ate. πŸ’…


✨ NAME ✨

cowrearrange β€” tile or cascade the windows on a given desk. That's it, that's the whole job. πŸŽ€


🌸 SYNOPSIS 🌸

cowrearrange tile [-o output] [-d desk] [--rows N] [--cols N] [-r|-R]
[-i] [-m] [-x SELECTOR ...]
cowrearrange cascade [-o output] [-d desk] [--dx N] [--dy N] [-r|-R]
[-i] [-m] [-x SELECTOR ...]

Two subcommands, same energy. Pick ur fighter. πŸ₯Š


πŸ¦‹ DESCRIPTION πŸ¦‹

So like, cowrearrange takes the windows chillin' on a desk and arranges them into either a tile (grid) layout or a cascade layout. Lowkey iconic behavior.

Two subcommands are supported:

πŸ“ tile

Fill the area with a grid of non-overlapping windows, one per window. No cap, no stacking, no drama.

By default the grid is approximately square, and a partially-filled last row stretches its cells to use the full width. Because why would we leave a sad empty gap at the end, right? 🫢

  • -r β€” the default for tile β€” resizes each window to fill its cell.
  • -R β€” preserves the current window sizes and only repositions. It's giving "I'm just gonna move u, not change u."

🌈 cascade

Stack the windows diagonally with a fixed pixel step between consecutive windows. Like a lil staircase of vibes. ✨

The default step is taken from the first window's title-bar thickness plus border width, so each cascaded window's titlebar peeks out below the previous one. That's the whole aesthetic β€” every titlebar gets its moment to shine. πŸ‘‘

  • -R β€” the default for cascade β€” preserves each window's current size.
  • -r β€” resizes every window to the same dimensions so the last cascaded window's bottom-right edge meets the bottom-right of the workarea. Perfectly aligned. Periodt.
By default, only the current output's desk is rearranged. Don't come for other desks unless u say so.

πŸ’… OPTIONS πŸ’…

  • -o output β€” Target an output name or selector. The selectors are @N, @current, @next, and @prev, and they mean exactly the same thing as they do in cow(1). Defaults to @current. πŸ’œ
  • -d desk β€” Target the desk number desk (0-indexed, bestie, don't forget) on the chosen output. Defaults to the current desk.
  • --rows N β€” tile only: fix the number of rows. When only --rows is given, the number of columns is computed from the window count and N. Combine it with --cols if u want to specify the grid exactly. 🎯
  • --cols N β€” tile only: fix the number of columns. When only --cols is given, rows are computed from the window count and N.
  • --dx N β€” cascade only: horizontal pixel step between successive windows. Default: first window's title_thickness + border_width.
  • --dy N β€” cascade only: vertical pixel step between successive windows. Default: first window's title_thickness + border_width.
  • -r β€” Resize windows to fit the layout. Default for tile. Resized windows are also marked tiled so clients that normally resize in increments can honour the exact layout geometry. Respect the geometry, fr fr.
  • -R β€” Place only, do not resize. Default for cascade.
  • -i β€” Include maximised and shaded windows. By default these are skipped, because their geometry is owned by the maximise / shade state and a plain move would silently break the invariant. Not today, satan. πŸ™ˆ
  • -m, --maximize β€” Mark each window maximised while retaining its original geometry. Unmaximising the window restores it to its previous geometry. It's reversible, bestie, we're not monsters. 🫢
  • -x SELECTOR, --exclude SELECTOR β€” Exclude any window matching SELECTOR from the candidate set. It's repeatable: a window is dropped if it matches the selector on any -x occurrence.

SELECTOR follows the same window-selector syntax cow uses for -t on its own commands:

  • %app_id β€” exact match against the window's app_id.
  • #id β€” exact match against the river window id (the value reported as "id" by moocow show -a window).
  • /text/ β€” title substring match. Trailing / optional; /foo and /foo/ behave identically.
Heads up: if a container member is excluded by app_id or title, the rest of the container's members are NOT pulled in as a substitute. Containers still count as a single layout entity, and excluding the active member excludes the container. No swapsies. πŸ’€

🧚 EXAMPLES 🧚

# Tile the current desk into an approximately square grid.
cowrearrange tile

# Tile windows and retain the resulting geometry as their maximised state.
cowrearrange tile -m

# Tile into exactly three columns, preserving window sizes.
cowrearrange tile --cols 3 -R

# Cascade the current desk's windows, resizing them all to the same
# size so the last window's bottom-right lines up with the workarea.
cowrearrange cascade -r

# Cascade only on the right-hand monitor.
cowrearrange cascade -o DP-2

# Tile desk 2 on DP-1, including maximised / shaded windows.
cowrearrange tile -o DP-1 -d 2 -i

# Tile the current desk but leave the firefox window alone.
cowrearrange tile -x %firefox

# Cascade everything except Slack and any window with "Preferences"
# in its title.
cowrearrange cascade --exclude %Slack --exclude /Preferences/

πŸ‘€ SEE ALSO πŸ‘€

cow(1), moocow(1), cowpager(1), cowident(1) β€” the whole friend group, go say hi. 🫢


πŸ‘‘ AUTHORS πŸ‘‘

Thomas Adam <thomas@xteddy.org> β€” the icon who made this happen. πŸ’–


And that's the tea, bestie. This is version 0.3, dated 2026-09-07, and it's the cowrearrange(1) page β€” go rearrange something and slay. βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from