package i3ipc

  1. Overview
  2. Docs
On This Page
  1. Pretty-printing
Legend:
Library
Module
Module type
Parameter
Class
Class type

Type definitions for the events that can be subscribed to.

type workspace_change =
  1. | Focus
  2. | Init
  3. | Empty
  4. | Urgent
  5. | Reload
  6. | Rename
  7. | Restored
  8. | Move
type workspace_event_info = {
  1. change : workspace_change;
  2. current : Reply.node option;
  3. old : Reply.node option;
}
type output_change =
  1. | Unspecified
type output_event_info = {
  1. change : output_change;
}
type mode_event_info = {
  1. change : string;
  2. pango_markup : bool;
}
type window_change =
  1. | New
  2. | Close
  3. | Focus
  4. | Title
  5. | FullscreenMode
  6. | Move
  7. | Floating
  8. | Urgent
  9. | Mark
type window_event_info = {
  1. change : window_change;
  2. container : Reply.node;
}
type bar_config_event_info = {
  1. bar_config : Reply.bar_config;
}
type binding_change =
  1. | Run
type input_type =
  1. | Keyboard
  2. | Mouse
type binding = {
  1. command : string;
  2. event_state_mask : string list;
  3. input_code : int;
  4. mods : string list option;
  5. symbol : string option;
  6. input_type : input_type;
}
type binding_event_info = {
  1. change : binding_change;
  2. binding : binding;
}
type shutdown_reason =
  1. | Restart
    (*

    i3 is shutting down due to a restart requested by the user

    *)
  2. | Exit
    (*

    i3 is shutting down due to an exit requested by the user

    *)
type tick_event_info = {
  1. first : bool;
  2. payload : string;
}
type t =
  1. | Workspace of workspace_event_info
    (*

    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).

    *)
  2. | Output of output_event_info
    (*

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

    *)
  3. | Mode of mode_event_info
    (*

    Sent whenever i3 changes its binding mode.

    *)
  4. | Window of window_event_info
    (*

    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.

    *)
  5. | BarConfig of bar_config_event_info
    (*

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

    *)
  6. | Binding of binding_event_info
    (*

    Sent when a configured command binding is triggered with the keyboard or mouse

    *)
  7. | Shutdown of shutdown_reason
    (*

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

    Important note: immediately after the client program receives a Shutdown event i3 wil close the socket with the client and an exception Protocol_error will be raised by this library: if you want your program survive an i3 restart, you must subscribe to this event and handle the subsequent exception.

    *)
  8. | Tick of tick_event_info
    (*

    This event is triggered by a subscription to tick events or by a SEND_TICK message.

    *)

Pretty-printing

val pp_workspace_change : Stdlib.Format.formatter -> workspace_change -> unit
val pp_workspace_event_info : Stdlib.Format.formatter -> workspace_event_info -> unit
val pp_output_change : Stdlib.Format.formatter -> output_change -> unit
val pp_output_event_info : Stdlib.Format.formatter -> output_event_info -> unit
val pp_mode_event_info : Stdlib.Format.formatter -> mode_event_info -> unit
val pp_window_change : Stdlib.Format.formatter -> window_change -> unit
val pp_window_event_info : Stdlib.Format.formatter -> window_event_info -> unit
val pp_bar_config_event_info : Stdlib.Format.formatter -> bar_config_event_info -> unit
val pp_binding_change : Stdlib.Format.formatter -> binding_change -> unit
val pp_input_type : Stdlib.Format.formatter -> input_type -> unit
val pp_binding : Stdlib.Format.formatter -> binding -> unit
val pp_binding_event_info : Stdlib.Format.formatter -> binding_event_info -> unit
val pp_shutdown_reason : Stdlib.Format.formatter -> shutdown_reason -> unit
val pp_tick_event_info : Stdlib.Format.formatter -> tick_event_info -> unit
val pp : Stdlib.Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.