Awesome Open Source
Awesome Open Source


A C interface library to i3wm.


i3's interprocess communication (or ipc) is the interface i3wm uses to receive commands from client applications such as i3-msg. It also features a publish/subscribe mechanism for notifying interested parties of window manager events.

i3ipc-GLib is a C library for controlling the window manager. This project is intended to be useful in applications such as status line generators, pagers, notification daemons, scripting wrappers, external controllers, dock windows, compositors, config templaters, and for debugging or testing the window manager itself.

The latest documentation can be found online here.


Projects using i3ipc-GLib


Check the releases page or your package manager for a package for your distro. Additional packages are available upon request.

Building the library requires autotools. Install the project with:

./ # --prefix=/usr might be required
sudo make install

The following packages are required for building i3-ipc:

  • libxcb and xcb-proto
  • glib >= 2.32
  • gobject-introspection (optional for bindings)
  • json-glib >= 0.14
  • gtk-doc-tools


The i3ipc connection class extends from GObject.

#include <glib/gprintf.h>
#include <i3ipc-glib/i3ipc-glib.h>

gint main() {
  i3ipcConnection *conn;
  gchar *reply;

  conn = i3ipc_connection_new(NULL, NULL);

  reply = i3ipc_connection_message(conn, I3IPC_MESSAGE_TYPE_COMMAND, "focus left", NULL);

  g_printf("Reply: %s\n", reply);


  return 0;

Compile with gcc -o example example.c $(pkg-config --libs --cflags i3ipc-glib-1.0).


Patches are welcome by pull request to fix bugs and add features.

Task List

Here is a list of tasks that could be done.

  • [ ] Async commands


This work is available under the GNU General Public License (See COPYING).

Copyright © 2014, Tony Crisci

All rights reserved.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c (15,752
i3 (67
i3wm (66