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

Safe HaskellNone
LanguageHaskell2010

I3IPC.Message

Synopsis

Documentation

data MessageType Source #

Constructors

RunCommand

Run the payload as an i3 command (like the commands you can bind to keys).

Workspaces

Get the list of current workspaces.

Subscribe

Subscribe this IPC connection to the event types specified in the message payload.

Outputs

Get the list of current outputs.

Tree

Get the i3 layout tree.

Marks

Gets the names of all currently set marks.

BarConfig

Gets the specified bar configuration or the names of all bar configurations if payload is empty.

Version

Gets the i3 version.

BindingModes

Gets the names of all currently configured binding modes.

Config

Returns the last loaded i3 config.

Tick

Sends a tick event with the specified payload.

Sync

Sends an i3 sync event with the specified random value to the specified window.

createMsg :: MessageType -> ByteString Source #

Create a msg for i3 based on MessageType without a message body, based on createMsg

createMsgPayload :: MessageType -> ByteString -> ByteString Source #

Create a message for i3 based on on MessageType Output of the form: "i3-ipc" msglen msgtype payload

sendMsg :: MonadIO m => Socket -> MessageType -> m Int64 Source #

Similar to sendMsg but with no message body

sendMsgPayload :: MonadIO m => Socket -> MessageType -> ByteString -> m Int64 Source #

Send a message over the socket of MessageType and some content