dwmipcpp is a C++ client library for communicating with an IPC-patched dwm. This library requires that dwm have the IPC patch which can be found here. This library contains a very simple interface for sending all the message types implemented in the IPC patch. It also supports subscribing to and listening for events.
To build dwmipcpp, you will need:
cmake (>= 3.0)
to build the libraryjsoncpp (>= 1.7.2)
for generating and parsing IPC messages- C+11 compiler to compile the library
To use the library, add the following to your project CMakeLists.txt
:
add_subdirectory(dwmipcpp)
include_directories(${DWMIPCPP_INCLUDE_DIRS})
include_directories(${DWMIPCPP_LIBRARY_DIRS})
target_link_libraries(<your project> ${DWMIPCPP_LIBRARIES})
The library is thoroughly documented using Doxygen. The documentation can be
found here. To use the library, you
only need to worry about the Connection
class.
Some example code for interacting with the library can be found in examples/.
To run the examples, you can execute the build.sh
script in the project
directory. The example executables will be located in build/examples/
.
See the dwm IPC patch
See the dwm polybar module [WIP]
Special thanks to the authors of i3ipcpp whose code structure was adapted for this library.