Safe Haskell | None |
---|---|
Language | Haskell2010 |
I3IPC.Event
Description
Synopsis
- data Event
- toEvent' :: Int -> ByteString -> Either String Event
- toEvent :: Int -> ByteString -> Either String Event
- data WorkspaceChange
- data WorkspaceEvent = WorkspaceEvent {
- wrk_change :: !WorkspaceChange
- wrk_current :: !(Maybe Node)
- wrk_old :: !(Maybe Node)
- data OutputEvent = OutputEvent {
- output_change :: !Text
- data ModeEvent = ModeEvent {
- mode_change :: !Text
- mode_pango_markup :: !Bool
- data WindowEvent = WindowEvent {
- win_change :: !WindowChange
- win_container :: !Node
- data WindowChange
- type BarConfigUpdateEvent = BarConfigReply
- data BindingEvent = BindingEvent {
- bind_change :: !Text
- bind_binding :: !BindingObject
- data BindingObject = BindingObject {
- bind_command :: !Text
- bind_event_state_mask :: !(Vector Text)
- bind_input_code :: !Int32
- bind_symbol :: !(Maybe Text)
- bind_input_type :: !BindType
- data BindType
- data ShutdownEvent = ShutdownEvent {}
- data ShutdownChange
- data TickEvent = TickEvent {
- tick_first :: !Bool
- tick_payload :: !Text
Documentation
Responses to the various events you can subscribe to.
Constructors
Workspace !WorkspaceEvent | See |
Output !OutputEvent | See |
Mode !ModeEvent | See |
Window !WindowEvent | See |
BarConfigUpdate !BarConfigUpdateEvent | See |
Binding !BindingEvent | See |
Shutdown !ShutdownEvent | See |
Tick !TickEvent | See |
data WorkspaceChange Source #
Instances
data WorkspaceEvent Source #
Workspace Event This event consists of a single serialized map containing a property change (string) which indicates the type of the change ("focus", "init", "empty", "urgent", "reload", "rename", "restored", "move"). A current (object) property will be present with the affected workspace whenever the type of event affects a workspace (otherwise, it will be +null). When the change is "focus", an old (object) property will be present with the previous workspace. When the first switch occurs (when i3 focuses the workspace visible at the beginning) there is no previous workspace, and the old property will be set to null. Also note that if the previous is empty it will get destroyed when switching, but will still be present in the "old" property.
Constructors
WorkspaceEvent | |
Fields
|
Instances
data OutputEvent Source #
Output Event This event consists of a single serialized map containing a property change (string) which indicates the type of the change (currently only "unspecified").
Constructors
OutputEvent | |
Fields
|
Instances
Eq OutputEvent Source # | |
Defined in I3IPC.Event | |
Show OutputEvent Source # | |
Defined in I3IPC.Event Methods showsPrec :: Int -> OutputEvent -> ShowS # show :: OutputEvent -> String # showList :: [OutputEvent] -> ShowS # | |
Generic OutputEvent Source # | |
Defined in I3IPC.Event Associated Types type Rep OutputEvent :: Type -> Type # | |
ToJSON OutputEvent Source # | |
Defined in I3IPC.Event Methods toJSON :: OutputEvent -> Value # toEncoding :: OutputEvent -> Encoding # toJSONList :: [OutputEvent] -> Value # toEncodingList :: [OutputEvent] -> Encoding # | |
FromJSON OutputEvent Source # | |
Defined in I3IPC.Event | |
type Rep OutputEvent Source # | |
Defined in I3IPC.Event type Rep OutputEvent = D1 (MetaData "OutputEvent" "I3IPC.Event" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "OutputEvent" PrefixI True) (S1 (MetaSel (Just "output_change") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) |
Mode Event This event consists of a single serialized map containing a property change (string) which holds the name of current mode in use. The name is the same as specified in config when creating a mode. The default mode is simply named default. It contains a second property, pango_markup, which defines whether pango markup shall be used for displaying this mode.
Constructors
ModeEvent | |
Fields
|
Instances
Eq ModeEvent Source # | |
Show ModeEvent Source # | |
Generic ModeEvent Source # | |
ToJSON ModeEvent Source # | |
Defined in I3IPC.Event | |
FromJSON ModeEvent Source # | |
type Rep ModeEvent Source # | |
Defined in I3IPC.Event type Rep ModeEvent = D1 (MetaData "ModeEvent" "I3IPC.Event" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "ModeEvent" PrefixI True) (S1 (MetaSel (Just "mode_change") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "mode_pango_markup") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool))) |
data WindowEvent Source #
Window Event This event consists of a single serialized map containing a property change (string) which indicates the type of the change
Constructors
WindowEvent | |
Fields
|
Instances
Eq WindowEvent Source # | |
Defined in I3IPC.Event | |
Show WindowEvent Source # | |
Defined in I3IPC.Event Methods showsPrec :: Int -> WindowEvent -> ShowS # show :: WindowEvent -> String # showList :: [WindowEvent] -> ShowS # | |
Generic WindowEvent Source # | |
Defined in I3IPC.Event Associated Types type Rep WindowEvent :: Type -> Type # | |
ToJSON WindowEvent Source # | |
Defined in I3IPC.Event Methods toJSON :: WindowEvent -> Value # toEncoding :: WindowEvent -> Encoding # toJSONList :: [WindowEvent] -> Value # toEncodingList :: [WindowEvent] -> Encoding # | |
FromJSON WindowEvent Source # | |
Defined in I3IPC.Event | |
type Rep WindowEvent Source # | |
Defined in I3IPC.Event type Rep WindowEvent = D1 (MetaData "WindowEvent" "I3IPC.Event" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "WindowEvent" PrefixI True) (S1 (MetaSel (Just "win_change") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 WindowChange) :*: S1 (MetaSel (Just "win_container") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Node))) |
data WindowChange Source #
Constructors
WinNew | the window has become managed by i3 |
WinClose | the window has closed |
WinFocus | the window has received input focus |
WinTitle | the window’s title has changed |
WinFullscreenMode | the window has entered or exited fullscreen mode |
WinMove | the window has changed its position in the tree |
WinFloating | the window has transitioned to or from floating |
WinUrgent | the window has become urgent or lost its urgent status |
WinMark | a mark has been added to or removed from the window |
Instances
type BarConfigUpdateEvent = BarConfigReply Source #
BarConfig_Update Event This event consists of a single serialized map reporting on options from the barconfig of the specified bar_id that were updated in i3. This event is the same as a GET_BAR_CONFIG reply for the bar with the given id.
data BindingEvent Source #
Binding Event This event consists of a single serialized map reporting on the details of a binding that ran a command because of user input. The change (string) field indicates what sort of binding event was triggered (right now it will always be "run" but may be expanded in the future).
Constructors
BindingEvent | |
Fields
|
Instances
data BindingObject Source #
Constructors
BindingObject | |
Fields
|
Instances
Bind type
data ShutdownEvent Source #
Shutdown Event This event is triggered when the connection to the ipc is about to shutdown because of a user action such as a restart or exit command. The change (string) field indicates why the ipc is shutting down. It can be either "restart" or "exit".
Constructors
ShutdownEvent | |
Fields |
Instances
data ShutdownChange Source #
Instances
Eq ShutdownChange Source # | |
Defined in I3IPC.Event Methods (==) :: ShutdownChange -> ShutdownChange -> Bool # (/=) :: ShutdownChange -> ShutdownChange -> Bool # | |
Show ShutdownChange Source # | |
Defined in I3IPC.Event Methods showsPrec :: Int -> ShutdownChange -> ShowS # show :: ShutdownChange -> String # showList :: [ShutdownChange] -> ShowS # | |
Generic ShutdownChange Source # | |
Defined in I3IPC.Event Associated Types type Rep ShutdownChange :: Type -> Type # Methods from :: ShutdownChange -> Rep ShutdownChange x # to :: Rep ShutdownChange x -> ShutdownChange # | |
ToJSON ShutdownChange Source # | |
Defined in I3IPC.Event Methods toJSON :: ShutdownChange -> Value # toEncoding :: ShutdownChange -> Encoding # toJSONList :: [ShutdownChange] -> Value # toEncodingList :: [ShutdownChange] -> Encoding # | |
FromJSON ShutdownChange Source # | |
Defined in I3IPC.Event Methods parseJSON :: Value -> Parser ShutdownChange # parseJSONList :: Value -> Parser [ShutdownChange] # | |
type Rep ShutdownChange Source # | |
Tick Event
This event is triggered by a subscription to tick events or by a Tick
message.
Constructors
TickEvent | |
Fields
|
Instances
Eq TickEvent Source # | |
Show TickEvent Source # | |
Generic TickEvent Source # | |
ToJSON TickEvent Source # | |
Defined in I3IPC.Event | |
FromJSON TickEvent Source # | |
type Rep TickEvent Source # | |
Defined in I3IPC.Event type Rep TickEvent = D1 (MetaData "TickEvent" "I3IPC.Event" "i3ipc-0.1.0.0-49OHvqoUlAnAVXKn08QYMP" False) (C1 (MetaCons "TickEvent" PrefixI True) (S1 (MetaSel (Just "tick_first") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool) :*: S1 (MetaSel (Just "tick_payload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) |