Events¶
-
class
i3ipc.
Event
(value)¶ An enumeration of events that can be subscribed to with
Connection.on()
.-
BARCONFIG_UPDATE
= 'barconfig_update'¶
-
BINDING
= 'binding'¶
-
INPUT
= 'input'¶
-
INPUT_ADDED
= 'input::added'¶
-
INPUT_REMOVED
= 'input::removed'¶
-
MODE
= 'mode'¶
-
OUTPUT
= 'output'¶
-
SHUTDOWN
= 'shutdown'¶
-
SHUTDOWN_EXIT
= 'shutdown::exit'¶
-
SHUTDOWN_RESTART
= 'shutdown::restart'¶
-
TICK
= 'tick'¶
-
WINDOW
= 'window'¶
-
WINDOW_CLOSE
= 'window::close'¶
-
WINDOW_FLOATING
= 'window::floating'¶
-
WINDOW_FOCUS
= 'window::focus'¶
-
WINDOW_FULLSCREEN_MODE
= 'window::fullscreen_mode'¶
-
WINDOW_MARK
= 'window::mark'¶
-
WINDOW_MOVE
= 'window::move'¶
-
WINDOW_NEW
= 'window::new'¶
-
WINDOW_TITLE
= 'window::title'¶
-
WINDOW_URGENT
= 'window::urgent'¶
-
WORKSPACE
= 'workspace'¶
-
WORKSPACE_EMPTY
= 'workspace::empty'¶
-
WORKSPACE_FOCUS
= 'workspace::focus'¶
-
WORKSPACE_INIT
= 'workspace::init'¶
-
WORKSPACE_MOVE
= 'workspace::move'¶
-
WORKSPACE_RELOAD
= 'workspace::reload'¶
-
WORKSPACE_RENAME
= 'workspace::rename'¶
-
WORKSPACE_RESTORED
= 'workspace::restored'¶
-
WORKSPACE_URGENT
= 'workspace::urgent'¶
-
-
class
i3ipc.
WorkspaceEvent
(data, conn, _Con=<class 'i3ipc.con.Con'>)¶ 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).
-
class
i3ipc.
WindowEvent
(data, conn, _Con=<class 'i3ipc.con.Con'>)¶ 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.
- Variables
change (str) – The type of change.
container – The window’s parent container.
ipc_data (dict) – The raw data from the i3 ipc.
-
class
i3ipc.
BarconfigUpdateEvent
(data)¶ Sent when the hidden_state or mode field in the barconfig of any bar instance was updated and when the config is reloaded.
- Variables
id (str) – The ID for this bar.
mode (str) – Either dock (the bar sets the dock window type) or hide (the bar does not show unless a specific key is pressed).
position (str) – Either bottom or top at the moment.
status_command (str) – Command which will be run to generate a statusline.
font (str) – The font to use for text on the bar.
workspace_buttons (bool) – Display workspace buttons or not.
binding_mode_indicator (bool) – Display the mode indicator or not.
verbose (bool) – Should the bar enable verbose output for debugging.
colors (dict) – Contains key/value pairs of colors. Each value is a color code in hex, formatted #rrggbb (like in HTML).
ipc_data (dict) – The raw data from the i3 ipc.
-
class
i3ipc.
BindingInfo
(data)¶ Info about a binding associated with a
BindingEvent
.- Variables
command (str) – The i3 command that is configured to run for this binding.
event_state_mask (list(str)) – The group and modifier keys that were configured with this binding.
input_code (int) – If the binding was configured with bindcode, this will be the key code that was given for the binding.
symbol (str or
None
if this binding was not configured with a symbol.) – If this is a keyboard binding that was configured with bindsym, this field will contain the given symbol.input_type (str) – This will be “keyboard” or “mouse” depending on whether or not this was a keyboard or a mouse binding.
ipc_data (dict) – The raw data from the i3 ipc.
-
class
i3ipc.
BindingEvent
(data)¶ Sent when a configured command binding is triggered with the keyboard or mouse.
- Variables
change (str) – The type of change.
binding (
BindingInfo
) – Contains details about the binding that was run.ipc_data (dict) – The raw data from the i3 ipc.
-
class
i3ipc.
TickEvent
(data)¶ 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).
- Variables
first (bool or
None
if not supported by this version of i3 (<=4.15).) – True when the ipc first subscribes to the tick event.payload (str) – The payload that was sent with the tick.
ipc_data (dict) – The raw data from the i3 ipc.
-
class
i3ipc.
ModeEvent
(data)¶ Sent whenever i3 changes its binding mode.
- Variables
change (str) – The name of the current mode in use.
pango_markup (bool) – Whether pango markup should be used for displaying this mode.
ipc_data (dict) – The raw data from the i3 ipc.
-
class
i3ipc.
OutputEvent
(data)¶ Sent when RandR issues a change notification (of either screens, outputs, CRTCs or output properties).
- Variables
change (str) – The type of change (currently only “unspecified”).
ipc_data (dict) – The raw data from the i3 ipc.
-
class
i3ipc.
ShutdownEvent
(data)¶ Sent when the ipc shuts down because of a restart or exit by user command.
- Variables
change (str) – The type of change.
ipc_data (dict) – The raw data from the i3 ipc.
-
class
i3ipc.
InputEvent
(data)¶ (sway only) Sent when something related to the input devices changes.
- Variables
change (str) – The type of change (“added” or “removed”)
input (
InputReply
) – Information about the input that changed.ipc_data (dict) – The raw data from the i3 ipc.