i3ipc: A type-safe wrapper around i3's IPC

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.


Library for controlling i3 through it's IPC. i3 communicates using a JSON interface over a unix socket. For JSON parsing I'm using Aeson. I've written out all the records and types to allow anyone to easily interact with i3 from a Haskell application.

[Skip to ReadMe]


Change logNone available
Dependenciesaeson (>=1.2 && <1.5), base (>=4.7 && <5), binary (>=0.8.6 && <0.10), bytestring (==0.10.*), containers (>=0.5.10 && <0.7), network (>= && <3.1), text (>= && <1.3), typed-process (>=0.2.4 && <0.3), vector (>=0.11.0 && <0.13) [details]
Copyright2019 Evan Cameron
AuthorEvan Cameron
Home pagehttps://github.com/leshow/i3ipc#readme
Source repositoryhead: git clone https://github.com/leshow/i3ipc
UploadedTue Mar 12 01:57:51 UTC 2019 by leshow




Maintainers' corner

For package maintainers and hackage trustees

Readme for i3ipc-

[back to package description]


Build Status

Haskell type-safe bindings for working with i3 using it's unix socket IPC

Subscribe to events:

import qualified I3IPC.Subscribe   as Sub
import           I3IPC              ( subscribe )

-- will print all events
main :: IO ()
main = subscribe print [Sub.Workspace, Sub.Window]

Sending Messages to i3:

import           I3IPC              ( connecti3
                                    , getWorkspaces

main :: IO ()
main = do
    soc <- connecti3
    print getWorkspaces

Alternatively, you can ignore the convenience functions and construct these messages yourself:

import qualified I3IPC.Message     as Msg
import           I3IPC              ( connecti3
                                    , receiveMsg

main :: IO ()
main = do
    soc <- connecti3
    print $ Msg.sendMsg soc Msg.Workspaces >> receiveMsg soc

I'm happy to take PRs or suggestions, or simply fix issues for this library.