Communicating with Metacity

Quite often people ask whether Metacity can talk to you across D-BUS, or something similar.  It can’t.  There is no need for this, because you can do pretty much anything you want using X messages.  In particular, you can use messages from the EWMH specification to perform pretty much any task you might want, and there are some additional Metacity-specific ones (such as an instruction to change the theme).

If you want to play with a client which can send these messages, I recommend wmctrl.  Try installing it (it’s in most distros, I think), and then playing with it to see how you can

  • switch desktops
  • bring a window to a desktop
  • resize a window
  • maximise a window
  • minimise all windows
  • list all windows
  • rename a window
  • … and so on.

Read its source for all the details; it’s quite clearly laid out.

Published by

Thomas Thurman

Mostly themes, triaging, and patch review.

Leave a Reply

Your email address will not be published. Required fields are marked *

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported.