thomasadam/cow
3
12
Fork
You've already forked cow
4
Compositor on Wayland -- a stacking window manager using river as the compositor. CoW aims to behave like fvwm and mwm from X11.
  • C 96.5%
  • Meson 1.4%
  • Lex 0.6%
  • Yacc 0.6%
  • Perl 0.5%
  • Other 0.4%
Thomas Adam 6498c7485b
All checks were successful
builds.sr.ht/alpine Job completed
IRC Notifications / Issue IRC notification (pull_request) Has been skipped
IRC Notifications / Tag IRC notification (pull_request) Has been skipped
builds.sr.ht/fedora Job completed
builds.sr.ht/openbsd Job completed
IRC Notifications / Pull request IRC notification (pull_request) Successful in 27s
builds.sr.ht/nixos Job completed
builds.sr.ht/freebsd Job completed
Fix container drag highlight crash
2026年07月09日 19:24:25 +01:00
.builds CI: add NixOS support 2026年07月07日 01:40:55 +01:00
.forgejo/workflows actions: add IRC notifier 2026年04月20日 18:20:30 +01:00
config decor: support titlebar positions 2026年07月08日 21:20:45 +01:00
cowbar decor: add title_format option 2026年07月06日 17:00:08 +01:00
dev-docs Fill script context 2026年06月17日 17:38:21 +01:00
examples/themes Improve FVWM theme fidelity 2026年07月04日 15:43:33 +01:00
include/cow decor: support titlebar positions 2026年07月08日 21:20:45 +01:00
logos repo: tidy up file locations 2026年05月28日 18:16:34 +01:00
man decor: support titlebar positions 2026年07月08日 21:20:45 +01:00
modules decor: support titlebar positions 2026年07月08日 21:20:45 +01:00
protocol cmd: add pick-window command 2026年06月09日 21:33:03 +01:00
share icon: add default icon image 2026年07月04日 18:17:21 +01:00
src Fix container drag highlight crash 2026年07月09日 19:24:25 +01:00
ss repo: tidy up file locations 2026年05月28日 18:16:34 +01:00
tools icons: make first-class objects 2026年07月04日 18:03:40 +01:00
vendor Add decor image support 2026年07月04日 00:46:38 +01:00
.clang-format windows: implement containers 2026年04月08日 21:50:44 +01:00
.gitignore gitignore: exclude .cache/ directory 2026年04月18日 14:09:30 +01:00
architecture.md architecture: document CoW/River relationship 2026年07月05日 18:58:34 +01:00
flake.lock nixos: add flake.nix 2026年07月07日 01:38:31 +01:00
flake.nix nixos: add flake.nix 2026年07月07日 01:38:31 +01:00
LICENSE initial commit 2026年04月06日 17:19:43 +01:00
meson.build build: move certain applications to modules/ 2026年07月06日 21:02:39 +01:00
meson_options.txt initial commit 2026年04月06日 17:19:43 +01:00
README.md cowiconman: initial implementation 2026年07月06日 18:56:34 +01:00
shell.nix CI: add shell.nix 2026年07月01日 21:26:41 +01:00

CoW -- Compostitor on Wayland

cow is a stacking window manager. Unlike other compositors based on wlroots, cow is a window manager using river as the compositor.

This allows for more focus on writing the window manager part without having to worry too much about wayland protocol handling, etc., effectively lumping that in with being a wayland display server.

Inspiration

cow's aims are to provide the following:

  • The look-and-feel of fvwm and mwm.
  • To provide a sensible mechanism for configuration, divorcing the need for complex configuration syntaxes, instead using dedicated commands that can be used both as a configuration file, and via IPC (runtime).

The commands are inspired by tmux(1).

Architecture / Design

See this document which explains how CoW and River work togethe, and hence the overall technical design considerations.

Where to Start?

There's been an attempt at some documentation:

  • cow(1) -- documents the commands/config settings which can be used to configure cow.
  • moocow(1) -- the CLI used to communicate with cow from shell-scripts, etc.
  • cowbar(1) -- JSON structure of the state of cow -- primarily used to provide information to waybar, but can be used for any bar.
  • cowiconman(1) -- FvwmIconMan-style window list.

More concretely though, have a look at:

  • cow config file -- this is documented and should help you start making changes. Copy it to ~/.config/cow to get started making changes,
  • waybar -- this can be copied verbatim to ~/.config/ if desired to it can be configured to your liking.

Wiki

See: https://codeberg.org/thomasadam/cow/wiki/Home

What does it look like?

There's also support for containers -- a top-level window which can group windows together into tabs.

Pages / Pager

A very crude video is also available

How do I build CoW?

Because cow is a window manager reliant on river, then the binary for river is required:

For the wayland parts:

  • wayland_client
  • xkbcommon
  • pangocairo
  • cairo
  • libbsd (for non-BSD systems; linux, etc.)

Note that the names of the libraries above will vary across systems.

Documentation is written in scdoc:

  • scdoc

For the embedded scripting language used by script { ... } blocks (see cow(1), section SCRIPTING):

  • bison (>= 3.0)
  • flex (>= 2.6)

The build system itself uses meson, and hence the following command will configure, build, and install cow:

meson setup build
meson compile -C build && meson install -C build

How do I run CoW?

There's a command called cow-start which you can run thus:

river -c 'cow-start'

It's recommended that you copy the river init file to ~/.config/river so that you can just run:

river

This will set up the environment before river starts to enable screen-sharing, etc. The river init file can be customised as needed.

Alternatively, a globally-installed cow.desktop file is installed allowing cow to be used with wayland login managers.

CoW Themes

CoW has support for themes -- see the themes directory for more information about how to use these. They're currently a feable and incomplete attempt at converting fvwm-themes to cow

Contact and Support

You can email me at: thomas at xteddy dot org

Or, use the IRC channel on libera.chat -- #cow-wayland

IRC is preferred over other forms of communication. Maybe I'll see you there?


FAQ

Here's some of the questions that have never been asked, frequently or otherwise...

Why is this called Cow?

Because originally, cow was going to be an all-in-one Compositor On Wayland (CoW), but now that it uses river to do all the heavy-lifting, this nae is a slight misnomer.

That said though, I like cows and, I'm going to stick with that name for now.

The cow logo isn't a cow. Why?

Astute observers will have noticed that the logo on the Codeberg page actually shows a Hereford bull, rather than a cow (which is female). Although this is considered wholly incorrect use of grammar, I reserve the right to use the word cow to mean both cows and bulls. Even though I should say "cattle".

For more information see:

https://bsd.network/web/@thomasadam/116766630953558702

Yes, this is all tongue-in-cheek.

:)

Moocow? Seriously?

Well, the way I see it, if you want cow to do anything, you need to "moo (at) cow", so moocow as an external command seemed appropriate.

Are multi-monitors supported?

Yes. For now, one will need to edit the start script to run wlr-randr with the appropriate values.

Note that this is controlled via river(1) and cow has no means of being able to set monitors directly. To get a more visual overview of things, the wdisplays command is helpful, and is similar to arandr from xrandr.

Logo and mascot.

Meet our mascot, Anvil the cow.

Luis Sobalvarro kindly created the CoW logo for this project.

and...

Massive thanks to you, Luis!

These logos are released under the same licence as CoW itself -- that is to say, they're free to use as long as attribution is given to Luis Sobalvarro.