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

Safe HaskellNone
LanguageHaskell2010

I3IPC.Event

Description

Related to Subscribe, specifically, each Event constructor matches a constructor for Subscribe

Synopsis

Documentation

data Event Source #

Responses to the various events you can subscribe to.

Constructors

Workspace !WorkspaceEvent

See WorkspaceEvent for response. Sent when the user switches to a different workspace, when a new workspace is initialized or when a workspace is removed (because the last client vanished).

Output !OutputEvent

See OutputEvent for response. Sent when RandR issues a change notification (of either screens, outputs, CRTCs or output properties).

Mode !ModeEvent

See ModeEvent for response. Sent whenever i3 changes its binding mode.

Window !WindowEvent

See WindowEvent for response. Sent when a client’s window is successfully reparented (that is when i3 has finished fitting it into a container), when a window received input focus or when certain properties of the window have changed.

BarConfigUpdate !BarConfigUpdateEvent

See BarConfigUpdateEvent for response. Sent when the hidden_state or mode field in the barconfig of any bar instance was updated and when the config is reloaded.

Binding !BindingEvent

See BindingEvent for response. Sent when a configured command binding is triggered with the keyboard or mouse

Shutdown !ShutdownEvent

See ShutdownEvent for response. Sent when the ipc shuts down because of a restart or exit by user command

Tick !TickEvent

See TickEvent for response. Sent when the ipc client subscribes to the tick event (with "first": true) or when any ipc client sends a SEND_TICK message (with "first": false).

Instances
Eq Event Source # 
Instance details

Defined in I3IPC.Event

Methods

(==) :: Event -> Event -> Bool #

(/=) :: Event -> Event -> Bool #

Show Event Source # 
Instance details

Defined in I3IPC.Event

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

data WorkspaceChange Source #

Instances
Eq WorkspaceChange Source # 
Instance details

Defined in I3IPC.Event

Show WorkspaceChange Source # 
Instance details

Defined in I3IPC.Event

Generic WorkspaceChange Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep WorkspaceChange :: Type -> Type #

ToJSON WorkspaceChange Source # 
Instance details

Defined in I3IPC.Event

FromJSON WorkspaceChange Source # 
Instance details

Defined in I3IPC.Event

type Rep WorkspaceChange Source # 
Instance details

Defined in I3IPC.Event

type Rep WorkspaceChange = D1 (MetaData "WorkspaceChange" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (((C1 (MetaCons "Focus" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Init" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Empty" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Urgent" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Rename" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Reload" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Restored" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Move" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "UnknownChange" PrefixI False) (U1 :: Type -> Type)))))

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
Eq WorkspaceEvent Source # 
Instance details

Defined in I3IPC.Event

Show WorkspaceEvent Source # 
Instance details

Defined in I3IPC.Event

Generic WorkspaceEvent Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep WorkspaceEvent :: Type -> Type #

ToJSON WorkspaceEvent Source # 
Instance details

Defined in I3IPC.Event

FromJSON WorkspaceEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep WorkspaceEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep WorkspaceEvent = D1 (MetaData "WorkspaceEvent" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (C1 (MetaCons "WorkspaceEvent" PrefixI True) (S1 (MetaSel (Just "wrk_change") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 WorkspaceChange) :*: (S1 (MetaSel (Just "wrk_current") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Node)) :*: S1 (MetaSel (Just "wrk_old") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Node)))))

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 # 
Instance details

Defined in I3IPC.Event

Show OutputEvent Source # 
Instance details

Defined in I3IPC.Event

Generic OutputEvent Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep OutputEvent :: Type -> Type #

ToJSON OutputEvent Source # 
Instance details

Defined in I3IPC.Event

FromJSON OutputEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep OutputEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep OutputEvent = D1 (MetaData "OutputEvent" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (C1 (MetaCons "OutputEvent" PrefixI True) (S1 (MetaSel (Just "output_change") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))

data ModeEvent Source #

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 # 
Instance details

Defined in I3IPC.Event

Show ModeEvent Source # 
Instance details

Defined in I3IPC.Event

Generic ModeEvent Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep ModeEvent :: Type -> Type #

ToJSON ModeEvent Source # 
Instance details

Defined in I3IPC.Event

FromJSON ModeEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep ModeEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep ModeEvent = D1 (MetaData "ModeEvent" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" 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

  • win_change :: !WindowChange
     
  • win_container :: !Node

    Additionally a container (object) field will be present, which consists of the window’s parent container. Be aware that for the "new" event, the container will hold the initial name of the newly reparented window (e.g. if you run urxvt with a shell that changes the title, you will still at this point get the window title as "urxvt").

Instances
Eq WindowEvent Source # 
Instance details

Defined in I3IPC.Event

Show WindowEvent Source # 
Instance details

Defined in I3IPC.Event

Generic WindowEvent Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep WindowEvent :: Type -> Type #

ToJSON WindowEvent Source # 
Instance details

Defined in I3IPC.Event

FromJSON WindowEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep WindowEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep WindowEvent = D1 (MetaData "WindowEvent" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" 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

WinUnknown

an unknown change, submit a PR to add a new WindowChange if you get this

Instances
Eq WindowChange Source # 
Instance details

Defined in I3IPC.Event

Show WindowChange Source # 
Instance details

Defined in I3IPC.Event

Generic WindowChange Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep WindowChange :: Type -> Type #

ToJSON WindowChange Source # 
Instance details

Defined in I3IPC.Event

FromJSON WindowChange Source # 
Instance details

Defined in I3IPC.Event

type Rep WindowChange Source # 
Instance details

Defined in I3IPC.Event

type Rep WindowChange = D1 (MetaData "WindowChange" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (((C1 (MetaCons "WinNew" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "WinClose" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "WinFocus" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "WinTitle" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "WinFullscreenMode" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "WinMove" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "WinFloating" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "WinUrgent" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "WinMark" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "WinUnknown" PrefixI False) (U1 :: Type -> Type)))))

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
Eq BindingEvent Source # 
Instance details

Defined in I3IPC.Event

Show BindingEvent Source # 
Instance details

Defined in I3IPC.Event

Generic BindingEvent Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep BindingEvent :: Type -> Type #

ToJSON BindingEvent Source # 
Instance details

Defined in I3IPC.Event

FromJSON BindingEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep BindingEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep BindingEvent = D1 (MetaData "BindingEvent" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (C1 (MetaCons "BindingEvent" PrefixI True) (S1 (MetaSel (Just "bind_change") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "bind_binding") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BindingObject)))

data BindingObject Source #

Instances
Eq BindingObject Source # 
Instance details

Defined in I3IPC.Event

Show BindingObject Source # 
Instance details

Defined in I3IPC.Event

Generic BindingObject Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep BindingObject :: Type -> Type #

ToJSON BindingObject Source # 
Instance details

Defined in I3IPC.Event

FromJSON BindingObject Source # 
Instance details

Defined in I3IPC.Event

type Rep BindingObject Source # 
Instance details

Defined in I3IPC.Event

type Rep BindingObject = D1 (MetaData "BindingObject" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (C1 (MetaCons "BindingObject" PrefixI True) ((S1 (MetaSel (Just "bind_command") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "bind_event_state_mask") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Vector Text))) :*: (S1 (MetaSel (Just "bind_input_code") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int32) :*: (S1 (MetaSel (Just "bind_symbol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "bind_input_type") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BindType)))))

data BindType Source #

Bind type

Constructors

Keyboard 
Mouse 
Instances
Eq BindType Source # 
Instance details

Defined in I3IPC.Event

Show BindType Source # 
Instance details

Defined in I3IPC.Event

Generic BindType Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep BindType :: Type -> Type #

Methods

from :: BindType -> Rep BindType x #

to :: Rep BindType x -> BindType #

ToJSON BindType Source # 
Instance details

Defined in I3IPC.Event

FromJSON BindType Source # 
Instance details

Defined in I3IPC.Event

type Rep BindType Source # 
Instance details

Defined in I3IPC.Event

type Rep BindType = D1 (MetaData "BindType" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (C1 (MetaCons "Keyboard" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Mouse" PrefixI False) (U1 :: Type -> 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".

Instances
Eq ShutdownEvent Source # 
Instance details

Defined in I3IPC.Event

Show ShutdownEvent Source # 
Instance details

Defined in I3IPC.Event

Generic ShutdownEvent Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep ShutdownEvent :: Type -> Type #

ToJSON ShutdownEvent Source # 
Instance details

Defined in I3IPC.Event

FromJSON ShutdownEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep ShutdownEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep ShutdownEvent = D1 (MetaData "ShutdownEvent" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (C1 (MetaCons "ShutdownEvent" PrefixI True) (S1 (MetaSel (Just "shutdown_change") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ShutdownChange)))

data ShutdownChange Source #

Constructors

Restart 
Exit 
Instances
Eq ShutdownChange Source # 
Instance details

Defined in I3IPC.Event

Show ShutdownChange Source # 
Instance details

Defined in I3IPC.Event

Generic ShutdownChange Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep ShutdownChange :: Type -> Type #

ToJSON ShutdownChange Source # 
Instance details

Defined in I3IPC.Event

FromJSON ShutdownChange Source # 
Instance details

Defined in I3IPC.Event

type Rep ShutdownChange Source # 
Instance details

Defined in I3IPC.Event

type Rep ShutdownChange = D1 (MetaData "ShutdownChange" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" False) (C1 (MetaCons "Restart" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Exit" PrefixI False) (U1 :: Type -> Type))

data TickEvent 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 # 
Instance details

Defined in I3IPC.Event

Show TickEvent Source # 
Instance details

Defined in I3IPC.Event

Generic TickEvent Source # 
Instance details

Defined in I3IPC.Event

Associated Types

type Rep TickEvent :: Type -> Type #

ToJSON TickEvent Source # 
Instance details

Defined in I3IPC.Event

FromJSON TickEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep TickEvent Source # 
Instance details

Defined in I3IPC.Event

type Rep TickEvent = D1 (MetaData "TickEvent" "I3IPC.Event" "i3ipc-0.2.0.0-2YNjrOd0NLg9KCfnA0qdC7" 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)))