Replies

class i3ipc.CommandReply(data)

A reply to the RUN_COMMAND message.

Variables
  • success (bool) – Whether the command succeeded.

  • error (str or None if no error message was set.) – A human-readable error message.

  • ipc_data (dict) – The raw data from the i3 ipc.

class i3ipc.VersionReply(data)

A reply to the GET_VERSION message.

Variables
  • major (int) – The major version of i3.

  • minor (int) – The minor version of i3.

  • patch (int) – The patch version of i3.

  • human_readable (str) – A human-readable version of i3 containing the precise git version, build date and branch name.

  • loaded_config_file_name (str) – The current config path.

  • ipc_data (dict) – The raw data from the i3 ipc.

class i3ipc.BarConfigReply(data)

A reply to the GET_BAR_CONFIG message with a specified bar id.

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

  • tray_padding (int) – The tray is shown on the right-hand side of the bar. By default, a padding of 2 pixels is used for the upper, lower and right-hand side of the tray area and between the individual icons.

  • hidden_state (str) – In order to control whether i3bar is hidden or shown in hide mode, there exists the hidden_state option, which has no effect in dock mode or invisible mode. It indicates the current hidden_state of the bar: (1) The bar acts like in normal hide mode, it is hidden and is only unhidden in case of urgency hints or by pressing the modifier key (hide state), or (2) it is drawn on top of the currently visible workspace (show state).

  • modifier (int) – The modifier used to switch between hide/show mode.

  • separator_symbol (str) – Specifies a custom symbol to be used for the separator as opposed to the vertical, one pixel thick separator.

  • workspace_min_width (int) –

  • strip_workspace_numbers (bool) – When strip_workspace_numbers is set to yes, any workspace that has a name of the form “[n][:][NAME]” will display only the name. You could use this, for instance, to display Roman numerals rather than digits by naming your workspaces to “2:I”, “2:II”, “3:III”, “4:IV”, …

  • strip_workspace_name (bool) – When strip_workspace_name is set to yes, any workspace that has a name of the form “[n][:][NAME]” will display only the number.

  • gaps (BarConfigGaps) – (sway only)

  • bar_height (int) – (sway only)

  • status_padding (int) – (sway only)

  • status_edge_padding (int) – (sway only)

  • ipc_data (dict) – The raw data from the i3 ipc.

class i3ipc.OutputReply(data)

A reply to the GET_OUTPUTS message.

Variables
  • name (str) – The name of this output (as seen in xrandr(1)).

  • active (bool) – Whether this output is currently active (has a valid mode).

  • primary (bool) – Whether this output is currently the primary output.

  • current_workspace (str or None if the output is not active.) – The name of the current workspace that is visible on this output. None if the output is not active.

  • rect (Rect) – The rectangle of this output (equals the rect of the output it is on).

  • make (str) – (sway only)

  • model (str) – (sway only)

  • serial (str) – (sway only)

  • scale (float) – (sway only)

  • transform (str) – (sway only)

  • max_render_time (int) – (sway only)

  • focused (bool) – (sway only)

  • dpms (bool) – (sway only)

  • subpixel_hinting (str) – (sway only)

  • modes (list(OutputMode)) – (sway only)

  • current_mode (OutputMode) – (sway only)

  • ipc_data (dict) – The raw data from the i3 ipc.

class i3ipc.InputReply(data)

(sway only) A reply to GET_INPUTS message.

Variables
  • identifier (str) – The identifier for the input device.

  • name (str) – The human readable name for the device

  • vendor (int) – The vendor code for the input device

  • product (int) – The product code for the input device

  • type (str) – The device type. Currently this can be keyboard, pointer, touch, tablet_tool, tablet_pad, or switch

  • xkb_active_layout_name (str) – (Only keyboards) The name of the active keyboard layout in use

  • xkb_layout_names (list(str)) – (Only keyboards) A list a layout names configured for the keyboard

  • xkb_active_layout_index (int) – (Only keyboards) The index of the active keyboard layout in use

  • libinput (dict) – (Only libinput devices) An object describing the current device settings.

  • ipc_data (dict) – The raw data from the i3 ipc.

class i3ipc.SeatReply(data)

(sway only) A reply to the GET_SEATS message.

Variables
  • name (str) – The unique name for the seat.

  • capabilities (int) – The number of capabilities the seat has.

  • focus (int) – The id of the node currently focused by the seat or _0_ when the seat is not currently focused by a node (i.e. a surface layer or xwayland unmanaged has focus)

  • devices (list(InputReply)) – An array of input devices that are attached to the seat.

  • ipc_data (dict) – The raw data from the i3 ipc.

class i3ipc.WorkspaceReply(data)

A reply to the GET_WORKSPACES message.

Variables
  • num (int) – The logical number of the workspace. Corresponds to the command to switch to this workspace. For named workspaces, this will be -1.

  • name (str) – The name of this workspace (by default num+1), as changed by the user.

  • visible (bool) – Whether this workspace is currently visible on an output (multiple workspaces can be visible at the same time).

  • focused (bool) – Whether this workspace currently has the focus (only one workspace can have the focus at the same time).

  • urgent (bool) – Whether a window on this workspace has the “urgent” flag set.

  • rect (Rect) – The rectangle of this workspace (equals the rect of the output it is on)

  • output (str) – The video output this workspace is on (LVDS1, VGA1, …).

  • ipc_data (dict) – The raw data from the i3 ipc.

class i3ipc.TickReply(data)

A reply to the SEND_TICK message.

Variables
  • success (bool) – Whether the tick succeeded.

  • ipc_data (dict) – The raw data from the i3 ipc.

class i3ipc.ConfigReply(data)

A reply to the GET_CONFIG message.

Variables
  • config (str) – A string containing the config file as loaded by i3 most recently.

  • ipc_data (dict) – The raw data from the i3 ipc.