Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data MessageType
- = RunCommand
- | Workspaces
- | Subscribe
- | Outputs
- | Tree
- | Marks
- | BarConfig
- | Version
- | BindingModes
- | Config
- | Tick
- | Sync
- createMsg :: MessageType -> ByteString
- createMsgPayload :: MessageType -> ByteString -> ByteString
- sendMsg :: Socket -> MessageType -> IO Int64
- sendMsgPayload :: Socket -> MessageType -> ByteString -> IO Int64
Documentation
data MessageType Source #
I3 IPC Commands https://i3wm.org/docs/ipc.html#_sending_messages_to_i3
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. |
Instances
Enum MessageType Source # | |
Defined in I3IPC.Message succ :: MessageType -> MessageType # pred :: MessageType -> MessageType # toEnum :: Int -> MessageType # fromEnum :: MessageType -> Int # enumFrom :: MessageType -> [MessageType] # enumFromThen :: MessageType -> MessageType -> [MessageType] # enumFromTo :: MessageType -> MessageType -> [MessageType] # enumFromThenTo :: MessageType -> MessageType -> MessageType -> [MessageType] # | |
Eq MessageType Source # | |
Defined in I3IPC.Message (==) :: MessageType -> MessageType -> Bool # (/=) :: MessageType -> MessageType -> Bool # | |
Show MessageType Source # | |
Defined in I3IPC.Message showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # |
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
sendMsgPayload :: Socket -> MessageType -> ByteString -> IO Int64 Source #
Send a message over the socket of MessageType
and some content