Safe Haskell | None |
---|---|
Language | Haskell2010 |
I3IPC.Reply
Synopsis
- data MsgReply
- toMsgReply' :: Int -> ByteString -> Either String MsgReply
- toMsgReply :: Int -> ByteString -> Either String MsgReply
- decodeBarIds :: ByteString -> Either String BarIds
- data Success = Success {}
- data WorkspaceReply = WorkspaceReply !(Vector Workspace)
- data Workspace = Workspace {}
- data OutputsReply = OutputsReply !(Vector Output)
- data Output = Output {
- output_name :: !Text
- output_active :: !Bool
- output_primary :: !Bool
- output_current_workspace :: !(Maybe Text)
- output_rect :: !Rect
- data Node = Node {
- node_id :: !Int
- node_name :: !(Maybe Text)
- node_type :: !NodeType
- node_output :: !(Maybe Text)
- node_orientation :: !NodeOrientation
- node_border :: !NodeBorder
- node_current_border_width :: !Int32
- node_layout :: !NodeLayout
- node_percent :: !(Maybe Float)
- node_rect :: !Rect
- node_window_rect :: !Rect
- node_deco_rect :: !Rect
- node_geometry :: !Rect
- node_window :: !(Maybe Int32)
- node_window_properties :: !(Maybe (Map WindowProperty (Maybe Text)))
- node_urgent :: !Bool
- node_focused :: !Bool
- node_focus :: !(Vector Int64)
- node_sticky :: !Bool
- node_floating_nodes :: !(Vector Node)
- node_nodes :: !(Vector Node)
- data NodeOrientation
- data WindowProperty
- = Title
- | Instance
- | Class
- | WindowRole
- | TransientFor
- data MarksReply = MarksReply !(Vector Text)
- data NodeBorder
- data Rect = Rect {}
- data NodeType
- data NodeLayout
- data BarIds = BarIds !(Vector Text)
- data BarConfigReply = BarConfigReply {
- bar_id :: !Text
- bar_mode :: !Text
- bar_position :: !Text
- bar_status_command :: !Text
- bar_font :: !Text
- bar_workspace_buttons :: !Bool
- bar_binding_mode_indicator :: !Bool
- bar_verbose :: !Bool
- bar_colors :: !(Map BarPart Text)
- data BarPart
- = Background
- | Statusline
- | Separator
- | FocusedBackground
- | FocusedStatusline
- | FocusedSeparator
- | FocusedWorkspaceText
- | FocusedWorkspaceBg
- | FocusedWorkspaceBorder
- | ActiveWorkspaceText
- | ActiveWorkspaceBg
- | ActiveWorkspaceBorder
- | InactiveWorkspaceText
- | InactiveWorkspaceBg
- | InactiveWorkspaceBorder
- | UrgentWorkspaceText
- | UrgentWorkspaceBg
- | UrgentWorkspaceBorder
- | BindingModeText
- | BindingModeBg
- | BindingModeBorder
- data VersionReply = VersionReply {
- v_major :: !Int32
- v_minor :: !Int32
- v_patch :: !Int32
- v_human_readable :: !Text
- v_loaded_config_file_name :: !Text
- data BindingModesReply = BindingModesReply !(Vector Text)
- data ConfigReply = ConfigReply {}
Documentation
Constructors
RunCommand !Success | Run the payload as an i3 command (like the commands you can bind to keys). |
Workspaces !WorkspaceReply | Get the list of current workspaces. |
Subscribe !Success | Subscribe this IPC connection to the event types specified in the message payload. |
Outputs !OutputsReply | Get the list of current outputs. |
Tree !Node | Get the i3 layout tree. |
Marks !MarksReply | Gets the names of all currently set marks. |
BarConfig !BarConfigReply | Gets the specified bar configuration or the names of all bar configurations if payload is empty. |
Version !VersionReply | Gets the i3 version. |
BindingModes !BindingModesReply | Gets the names of all currently configured binding modes. |
Config !ConfigReply | Returns the last loaded i3 config. |
Tick !Success | Sends a tick event with the specified payload. |
Sync !Success | Sends an i3 sync event with the specified random value to the specified window. |
toMsgReply' :: Int -> ByteString -> Either String MsgReply Source #
toMsgReply :: Int -> ByteString -> Either String MsgReply Source #
decodeBarIds :: ByteString -> Either String BarIds Source #
Success Reply used for Sync, Subscribe, Command, Tick
data WorkspaceReply Source #
Workspaces Reply The reply consists of a serialized list of workspaces.
Constructors
WorkspaceReply !(Vector Workspace) |
Instances
Constructors
Workspace | |
Fields
|
Instances
data OutputsReply Source #
Outputs Reply The reply consists of a serialized list of outputs.
Constructors
OutputsReply !(Vector Output) |
Instances
Eq OutputsReply Source # | |
Defined in I3IPC.Reply | |
Show OutputsReply Source # | |
Defined in I3IPC.Reply Methods showsPrec :: Int -> OutputsReply -> ShowS # show :: OutputsReply -> String # showList :: [OutputsReply] -> ShowS # | |
Generic OutputsReply Source # | |
Defined in I3IPC.Reply Associated Types type Rep OutputsReply :: Type -> Type # | |
ToJSON OutputsReply Source # | |
Defined in I3IPC.Reply Methods toJSON :: OutputsReply -> Value # toEncoding :: OutputsReply -> Encoding # toJSONList :: [OutputsReply] -> Value # toEncodingList :: [OutputsReply] -> Encoding # | |
FromJSON OutputsReply Source # | |
Defined in I3IPC.Reply | |
type Rep OutputsReply Source # | |
Defined in I3IPC.Reply type Rep OutputsReply = D1 (MetaData "OutputsReply" "I3IPC.Reply" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "OutputsReply" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Vector Output)))) |
Constructors
Output | |
Fields
|
Instances
Eq Output Source # | |
Show Output Source # | |
Generic Output Source # | |
ToJSON Output Source # | |
Defined in I3IPC.Reply | |
FromJSON Output Source # | |
type Rep Output Source # | |
Defined in I3IPC.Reply type Rep Output = D1 (MetaData "Output" "I3IPC.Reply" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "Output" PrefixI True) ((S1 (MetaSel (Just "output_name") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "output_active") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)) :*: (S1 (MetaSel (Just "output_primary") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool) :*: (S1 (MetaSel (Just "output_current_workspace") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "output_rect") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Rect))))) |
Tree Reply The reply consists of a serialized tree. Each node in the tree (representing one container) has at least the properties listed below. While the nodes might have more properties, please do not use any properties which are not documented here. They are not yet finalized and will probably change!
Constructors
Node | |
Fields
|
Instances
data NodeOrientation Source #
Constructors
Horizontal | |
Vertical | |
OrientNone |
Instances
data WindowProperty Source #
Constructors
Title | |
Instance | |
Class | |
WindowRole | |
TransientFor |
Instances
data MarksReply Source #
Marks Reply The reply consists of a single array of strings for each container that has a mark. A mark can only be set on one container, so the array is unique. The order of that array is undefined. If no window has a mark the response will be the empty array [].
Constructors
MarksReply !(Vector Text) |
Instances
Eq MarksReply Source # | |
Defined in I3IPC.Reply | |
Show MarksReply Source # | |
Defined in I3IPC.Reply Methods showsPrec :: Int -> MarksReply -> ShowS # show :: MarksReply -> String # showList :: [MarksReply] -> ShowS # | |
Generic MarksReply Source # | |
Defined in I3IPC.Reply Associated Types type Rep MarksReply :: Type -> Type # | |
ToJSON MarksReply Source # | |
Defined in I3IPC.Reply Methods toJSON :: MarksReply -> Value # toEncoding :: MarksReply -> Encoding # toJSONList :: [MarksReply] -> Value # toEncodingList :: [MarksReply] -> Encoding # | |
FromJSON MarksReply Source # | |
Defined in I3IPC.Reply | |
type Rep MarksReply Source # | |
Defined in I3IPC.Reply type Rep MarksReply = D1 (MetaData "MarksReply" "I3IPC.Reply" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "MarksReply" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Vector Text)))) |
data NodeBorder Source #
Instances
Eq NodeBorder Source # | |
Defined in I3IPC.Reply | |
Show NodeBorder Source # | |
Defined in I3IPC.Reply Methods showsPrec :: Int -> NodeBorder -> ShowS # show :: NodeBorder -> String # showList :: [NodeBorder] -> ShowS # | |
Generic NodeBorder Source # | |
Defined in I3IPC.Reply Associated Types type Rep NodeBorder :: Type -> Type # | |
ToJSON NodeBorder Source # | |
Defined in I3IPC.Reply Methods toJSON :: NodeBorder -> Value # toEncoding :: NodeBorder -> Encoding # toJSONList :: [NodeBorder] -> Value # toEncodingList :: [NodeBorder] -> Encoding # | |
FromJSON NodeBorder Source # | |
Defined in I3IPC.Reply | |
type Rep NodeBorder Source # | |
Defined in I3IPC.Reply |
Instances
Eq Rect Source # | |
Show Rect Source # | |
Generic Rect Source # | |
ToJSON Rect Source # | |
Defined in I3IPC.Reply | |
FromJSON Rect Source # | |
type Rep Rect Source # | |
Defined in I3IPC.Reply type Rep Rect = D1 (MetaData "Rect" "I3IPC.Reply" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "Rect" PrefixI True) ((S1 (MetaSel (Just "x") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int32) :*: S1 (MetaSel (Just "y") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int32)) :*: (S1 (MetaSel (Just "width") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int32) :*: S1 (MetaSel (Just "height") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int32)))) |
Constructors
RootType | |
OutputType | |
ConType | |
FloatingConType | |
WorkspaceType | |
DockAreaType |
Instances
Eq NodeType Source # | |
Show NodeType Source # | |
Generic NodeType Source # | |
ToJSON NodeType Source # | |
Defined in I3IPC.Reply | |
FromJSON NodeType Source # | |
type Rep NodeType Source # | |
Defined in I3IPC.Reply type Rep NodeType = D1 (MetaData "NodeType" "I3IPC.Reply" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) ((C1 (MetaCons "RootType" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "OutputType" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ConType" PrefixI False) (U1 :: Type -> Type))) :+: (C1 (MetaCons "FloatingConType" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "WorkspaceType" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "DockAreaType" PrefixI False) (U1 :: Type -> Type)))) |
data NodeLayout Source #
Constructors
SplitHorizontalLayout | |
SplitVerticalLayout | |
StackedLayout | |
TabbedLayout | |
DockAreaLayout | |
OutputLayout |
Instances
BarConfig Reply This can be used by third-party workspace bars (especially i3bar, but others are free to implement compatible alternatives) to get the bar block configuration from i3.
data BarConfigReply Source #
Constructors
BarConfigReply | |
Fields
|
Instances
Constructors
Instances
Enum BarPart Source # | |
Eq BarPart Source # | |
Ord BarPart Source # | |
Show BarPart Source # | |
Generic BarPart Source # | |
ToJSON BarPart Source # | |
Defined in I3IPC.Reply | |
ToJSONKey BarPart Source # | |
Defined in I3IPC.Reply | |
FromJSON BarPart Source # | |
FromJSONKey BarPart Source # | |
Defined in I3IPC.Reply Methods | |
type Rep BarPart Source # | |
Defined in I3IPC.Reply type Rep BarPart = D1 (MetaData "BarPart" "I3IPC.Reply" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) ((((C1 (MetaCons "Background" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Statusline" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Separator" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "FocusedBackground" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "FocusedStatusline" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "FocusedSeparator" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "FocusedWorkspaceText" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "FocusedWorkspaceBg" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "FocusedWorkspaceBorder" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ActiveWorkspaceText" PrefixI False) (U1 :: Type -> Type))))) :+: (((C1 (MetaCons "ActiveWorkspaceBg" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ActiveWorkspaceBorder" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "InactiveWorkspaceText" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "InactiveWorkspaceBg" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "InactiveWorkspaceBorder" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "UrgentWorkspaceText" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "UrgentWorkspaceBg" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "UrgentWorkspaceBorder" PrefixI False) (U1 :: Type -> Type))) :+: (C1 (MetaCons "BindingModeText" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "BindingModeBg" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "BindingModeBorder" PrefixI False) (U1 :: Type -> Type)))))) |
data VersionReply Source #
Version Reply
Constructors
VersionReply | |
Fields
|
Instances
data BindingModesReply Source #
BindingModes Reply The reply consists of an array of all currently configured binding modes.
Constructors
BindingModesReply !(Vector Text) |
Instances
data ConfigReply Source #
Config Reply The config reply is a map which currently only contains the "config" member, which is a string containing the config file as loaded by i3 most recently.
Constructors
ConfigReply | |
Instances
Eq ConfigReply Source # | |
Defined in I3IPC.Reply | |
Show ConfigReply Source # | |
Defined in I3IPC.Reply Methods showsPrec :: Int -> ConfigReply -> ShowS # show :: ConfigReply -> String # showList :: [ConfigReply] -> ShowS # | |
Generic ConfigReply Source # | |
Defined in I3IPC.Reply Associated Types type Rep ConfigReply :: Type -> Type # | |
ToJSON ConfigReply Source # | |
Defined in I3IPC.Reply Methods toJSON :: ConfigReply -> Value # toEncoding :: ConfigReply -> Encoding # toJSONList :: [ConfigReply] -> Value # toEncodingList :: [ConfigReply] -> Encoding # | |
FromJSON ConfigReply Source # | |
Defined in I3IPC.Reply | |
type Rep ConfigReply Source # | |
Defined in I3IPC.Reply type Rep ConfigReply = D1 (MetaData "ConfigReply" "I3IPC.Reply" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "ConfigReply" PrefixI True) (S1 (MetaSel (Just "c_config") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) |