i3ipc-d ~master

D library for communicating with the i3 window manager

To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:


i3ipc-d provides a high-level D API to the window manager i3's interprocess communication interface.

See here for an example showing all available API methods and here for all examples. A connection in i3ipc-d has always exactly one of the following characteristics:

  • threaded (events are automatically dispatched by a dedicated thread),
  • fibered (events need to be explicitly dispatched by calling `connection.dispatch`), or
  • eventless (events are not supported at all).

The following shows how to setup a threaded connection:

module threaded;

import core.time : seconds;
import core.thread : Thread, dur;

import std.stdio : writeln;

import i3ipc;

void main(string[] args)
	auto connection = i3ipc.connect!Thread;

	connection.subscribe!"Workspace"((change, current, old) => writeln(change, " ", current, " ", old));

	writeln("Connection open for approximately 3 seconds, please generate some i3 workspace events!");
	/+ A thread-backed connection automatically dispatches events,
	 + this just delays program termination.
  • Moritz Maxeiner
0.0.1 2016-Mar-29
~master 2016-May-31
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 1 downloads this month

  • 54 downloads total

Short URL: