Description

D library for communicating with the i3 window manager

Package Information

Version0.0.1 (2016-Mar-29)
Homepage https://github.com/Calrama/i3ipc-d
Repository https://github.com/calrama/i3ipc-d
LicenseMIT
CopyrightCopyright © 2016, Moritz Maxeiner
AuthorsMoritz Maxeiner
Registered byMoritz Maxeiner
Dependencies none

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

i3ipc-d

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

See here for the examples, one of which is this:

module threaded;

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

import std.stdio : writeln;

import i3ipc;

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

	c.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.
	 +/
	Thread.sleep(3.seconds);
}

Available versions

0.0.1 ~master