.\" Generated by scdoc 1.11.4 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "sway-ipc" "7" "2026-06-23" .PP .SH NAME .PP sway-ipc - IPC protocol for sway .PP .SH DESCRIPTION .PP This details the interprocess communication (IPC) protocol for \fBsway\fR(1).\& This IPC protocol can be used to control or obtain information from a sway process.\& .PP The IPC protocol uses a UNIX socket as the method of communication.\& The path to the socket is stored in the environment variable \fISWAYSOCK\fR and, for backwards compatibility with i3, \fII3SOCK\fR.\& You can also retrieve the socket path by calling \fIsway --get-socketpath\fR.\& .PP .SH MESSAGE AND REPLY FORMAT .PP The format for messages and replies is: .RS 4 .RE Where .br is \fIi3-ipc\fR, for compatibility with i3 .br is a 32-bit integer in native byte order .br is a 32-bit integer in native byte order .PP For example, sending the \fIexit\fR command would look like the following hexdump: .nf .RS 4 00000000 | 69 33 2d 69 70 63 04 00 00 00 00 00 00 00 65 78 |i3-ipc\&.\&.\&.\&.\&.\&.\&.\&.ex| 00000010 | 69 74 |it | .fi .RE .PP The payload for replies will be a valid serialized JSON data structure.\& .PP .SH MESSAGES AND REPLIES .PP The following message types and their corresponding reply types are currently supported.\& \fBFor all replies, any properties not listed are subject to removal.\&\fR .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l. T{ \fBTYPE NUMBER\fR T} T{ \fBMESSAGE NAME\fR T} T{ \fBPURPOSE\fR T} T{ 0 T} T{ RUN_COMMAND T} T{ Runs the payload as sway commands T} T{ 1 T} T{ GET_WORKSPACES T} T{ Get the list of current workspaces T} T{ 2 T} T{ SUBSCRIBE T} T{ Subscribe the IPC connection to the events listed in the payload T} T{ 3 T} T{ GET_OUTPUTS T} T{ Get the list of current outputs T} T{ 4 T} T{ GET_TREE T} T{ Get the node layout tree T} T{ 5 T} T{ GET_MARKS T} T{ Get the names of all the marks currently set T} T{ 6 T} T{ GET_BAR_CONFIG T} T{ Get the specified bar config or a list of bar config names T} T{ 7 T} T{ GET_VERSION T} T{ Get the version of sway that owns the IPC socket T} T{ 8 T} T{ GET_BINDING_MODES T} T{ Get the list of binding mode names T} T{ 9 T} T{ GET_CONFIG T} T{ Returns the config that was last loaded T} T{ 10 T} T{ SEND_TICK T} T{ Sends a tick event with the specified payload T} T{ 11 T} T{ SYNC T} T{ Replies failure object for i3 compatibility T} T{ 12 T} T{ GET_BINDING_STATE T} T{ Request the current binding state, e.\&g.\& the currently active binding mode name.\& T} T{ 100 T} T{ GET_INPUTS T} T{ Get the list of input devices T} T{ 101 T} T{ GET_SEATS T} T{ Get the list of seats T} .TE .sp 1 .SS 0. RUN_COMMAND .PP \fBMESSAGE\fR .br Parses and runs the payload as sway commands .PP \fBREPLY\fR .br An array of objects corresponding to each command that was parsed.\& Each object has the property \fIsuccess\fR, which is a boolean indicating whether the command was successful.\& The object may also contain the properties \fIerror\fR and \fIparse_error\fR.\& The \fIerror\fR property is a human readable error message while \fIparse_error\fR is a boolean indicating whether the reason the command failed was because the command was unknown or not able to be parsed.\& .PP \fBExample Reply:\fR .nf .RS 4 [ { "success": true }, { "success": false, "parse_error": true, "error": "Invalid/unknown command" } ] .fi .RE .PP .SS 1. GET_WORKSPACES .PP \fBMESSAGE\fR .br Retrieves the list of workspaces.\& .PP \fBREPLY\fR .br The reply is an array of objects corresponding to each workspace.\& Each object has the following properties: .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ num T} T{ integer T} T{ The workspace number or -1 for workspaces that do not start with a number T} T{ name T} T{ string T} T{ The name of the workspace T} T{ visible T} T{ boolean T} T{ Whether the workspace is currently visible on any output T} T{ focused T} T{ boolean T} T{ Whether the workspace is currently focused by the default seat (\fIseat0\fR) T} T{ urgent T} T{ boolean T} T{ Whether a window on the workspace has the urgent flag set T} T{ rect T} T{ object T} T{ The bounds of the workspace.\& It consists of \fIx\fR, \fIy\fR, \fIwidth\fR, and \fIheight\fR T} T{ output T} T{ string T} T{ The name of the output that the workspace is on T} .TE .sp 1 .PP \fBExample Reply:\fR .nf .RS 4 [ { "num": 1, "name": "1", "visible": true, "focused": true, "rect": { "x": 0, "y": 23, "width": 1920, "height": 1057 }, "output": "eDP-1" }, ] .fi .RE .PP .SS 2. SUBSCRIBE .PP \fBMESSAGE\fR .br Subscribe this IPC connection to the event types specified in the message payload.\& The payload should be a valid JSON array of events.\& See the \fIEVENTS\fR section for the list of supported events.\& .PP \fBREPLY\fR .br A single object that contains the property \fIsuccess\fR, which is a boolean value indicating whether the subscription was successful or not.\& .PP \fBExample Reply:\fR .nf .RS 4 { "success": true } .fi .RE .PP .SS 3. GET_OUTPUTS .PP \fBMESSAGE\fR .br Retrieve the list of outputs .PP \fBREPLY\fR .br An array of objects corresponding to each output.\& Each object has the following properties: .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ name T} T{ string T} T{ The name of the output.\& On DRM, this is the connector T} T{ make T} T{ string T} T{ The make of the output T} T{ model T} T{ string T} T{ The model of the output T} T{ serial T} T{ string T} T{ The output'\&s serial number as a hexadecimal string T} T{ active T} T{ boolean T} T{ Whether this output is active/enabled T} T{ dpms T} T{ boolean T} T{ (Deprecated, use \fIpower\fR instead) Whether this output is on/off (via DPMS) T} T{ power T} T{ boolean T} T{ Whether this output is on/off T} T{ primary T} T{ boolean T} T{ For i3 compatibility, this will be false.\& It does not make sense in Wayland T} T{ scale T} T{ float T} T{ The scale currently in use on the output or \fI-1\fR for disabled outputs T} T{ subpixel_hinting T} T{ string T} T{ The subpixel hinting current in use on the output.\& This can be \fIrgb\fR, \fIbgr\fR, \fIvrgb\fR, \fIvbgr\fR, or \fInone\fR T} T{ transform T} T{ string T} T{ The transform currently in use for the output.\& This can be \fInormal\fR, \fI90\fR, \fI180\fR, \fI270\fR, \fIflipped-90\fR, \fIflipped-180\fR, or \fIflipped-270\fR T} T{ current_workspace T} T{ string T} T{ The workspace currently visible on the output or \fInull\fR for disabled outputs T} T{ modes T} T{ array T} T{ An array of supported mode objects.\& Each object contains \fIwidth\fR, \fIheight\fR, and \fIrefresh\fR T} T{ current_mode T} T{ object T} T{ An object representing the current mode containing \fIwidth\fR, \fIheight\fR, and \fIrefresh\fR T} T{ rect T} T{ object T} T{ The bounds for the output consisting of \fIx\fR, \fIy\fR, \fIwidth\fR, and \fIheight\fR T} T{ hdr T} T{ boolean T} T{ Whether HDR is enabled T} .TE .sp 1 .PP \fBExample Reply:\fR .nf .RS 4 [ { "name": "HDMI-A-2", "make": "Unknown", "model": "NS-19E310A13", "serial": "0x00000001", "active": true, "primary": false, "scale": 1\&.0, "subpixel_hinting": "rgb", "transform": "normal", "current_workspace": "1", "modes": [ { "width": 640, "height": 480, "refresh": 59940 }, { "width": 800, "height": 600, "refresh": 60317 }, { "width": 1024, "height": 768, "refresh": 60004 }, { "width": 1920, "height": 1080, "refresh": 60000 } ], "current_mode": { "width": 1920, "height": 1080, "refresh": 60000 } } ] .fi .RE .PP .SS 4. GET_TREE .PP \fBMESSAGE\fR .br Retrieve a JSON representation of the tree .PP \fBREPLY\fR .br An array of objects that represent the current tree.\& Each object represents one node and will have the following properties: .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ id T} T{ integer T} T{ The internal unique ID for this node T} T{ name T} T{ string T} T{ The name of the node such as the output name or window title.\& For the scratchpad, this will be \fI__i3_scratch\fR for compatibility with i3.\& T} T{ type T} T{ string T} T{ The node type.\& It can be \fIroot\fR, \fIoutput\fR, \fIworkspace\fR, \fIcon\fR, or \fIfloating_con\fR T} T{ border T} T{ string T} T{ The border style for the node.\& It can be \fInormal\fR, \fInone\fR, \fIpixel\fR, or \fIcsd\fR T} T{ current_border_width T} T{ integer T} T{ Number of pixels used for the border width T} T{ layout T} T{ string T} T{ The node'\&s layout.\& It can either be \fIsplith\fR, \fIsplitv\fR, \fIstacked\fR, \fItabbed\fR, or \fIoutput\fR T} T{ orientation T} T{ string T} T{ The node'\&s orientation.\& It can be \fIvertical\fR, \fIhorizontal\fR, or \fInone\fR T} T{ percent T} T{ float T} T{ The percentage of the node'\&s parent that it takes up or \fInull\fR for the root and other special nodes such as the scratchpad T} T{ rect T} T{ object T} T{ The absolute geometry of the node.\& The window decorations are excluded from this, but borders are included.\& T} T{ window_rect T} T{ object T} T{ The geometry of the content inside the node.\& These coordinates are relative to the node itself.\& Window decorations and borders are outside the \fIwindow_rect\fR T} T{ deco_rect T} T{ object T} T{ The geometry of the decorations for the node relative to the parent node T} T{ geometry T} T{ object T} T{ The natural geometry of the contents if it were to size itself T} T{ urgent T} T{ boolean T} T{ Whether the node or any of its descendants has the urgent hint set.\& Note: This may not exist when compiled without \fIxwayland\fR support T} T{ sticky T} T{ boolean T} T{ Whether the node is sticky (shows on all workspaces) T} T{ marks T} T{ array T} T{ List of marks assigned to the node T} T{ focused T} T{ boolean T} T{ Whether the node is currently focused by the default seat (\fIseat0\fR) T} T{ focus T} T{ array T} T{ Array of child node IDs in the current focus order T} T{ nodes T} T{ array T} T{ The tiling children nodes for the node T} T{ floating_nodes T} T{ array T} T{ The floating children nodes for the node T} T{ representation T} T{ string T} T{ (Only workspaces) A string representation of the layout of the workspace that can be used as an aid in submitting reproduction steps for bug reports T} T{ fullscreen_mode T} T{ integer T} T{ (Only containers and windows) The fullscreen mode of the node.\& 0 means none, 1 means full workspace, and 2 means global fullscreen T} T{ floating T} T{ string T} T{ Floating state of container.\& Can be either "auto_off" or "user_on" T} T{ scratchpad_state T} T{ string T} T{ Whether the window is in the scratchpad.\& Can be either "none" or "fresh" T} T{ app_id T} T{ string T} T{ (Only windows) For an xdg-shell window, the name of the application, if set.\& Otherwise, \fInull\fR T} T{ pid T} T{ integer T} T{ (Only windows) The PID of the application that owns the window T} T{ foreign_toplevel_identifier T} T{ string T} T{ (Only windows) The ext-foreign-toplevel-list-v1 toplevel identifier of this node.\& T} T{ visible T} T{ boolean T} T{ (Only windows) Whether the node is visible T} T{ shell T} T{ string T} T{ (Only windows) The shell of the window, such as \fIxdg_shell\fR or \fIxwayland\fR T} T{ inhibit_idle T} T{ boolean T} T{ (Only windows) Whether the window is inhibiting the idle state T} T{ idle_inhibitors T} T{ object T} T{ (Only windows) An object containing the state of the \fIapplication\fR and \fIuser\fR idle inhibitors.\& \fIapplication\fR can be \fIenabled\fR or \fInone\fR.\& \fIuser\fR can be \fIfocus\fR, \fIfullscreen\fR, \fIopen\fR, \fIvisible\fR or \fInone\fR.\& T} T{ sandbox_engine T} T{ string T} T{ (Only windows) The associated sandbox engine (or \fInull\fR) T} T{ sandbox_app_id T} T{ string T} T{ (Only windows) The app ID provided by the associated sandbox engine (or \fInull\fR) T} T{ sandbox_instance_id T} T{ string T} T{ (Only windows) The instance ID provided by the associated sandbox engine (or \fInull\fR) T} T{ tag T} T{ string T} T{ (Only windows) For an xdg-shell window, tag of the toplevel, if set.\& Otherwise, \fInull\fR T} T{ window T} T{ integer T} T{ (Only xwayland windows) The X11 window ID for the xwayland window T} T{ window_properties T} T{ object T} T{ (Only xwayland windows) An object containing the \fItitle\fR, \fIclass\fR, \fIinstance\fR, \fIwindow_role\fR, \fIwindow_type\fR, and \fItransient_for\fR for the window T} .TE .sp 1 .PP \fBExample Reply:\fR .nf .RS 4 { "id": 1, "name": "root", "rect": { "x": 0, "y": 0, "width": 1920, "height": 1080 }, "focused": false, "focus": [ 3 ], "border": "none", "current_border_width": 0, "layout": "splith", "orientation": "horizontal", "percent": null, "window_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 0, "height": 0 }, "window": null, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "root", "nodes": [ { "id": 2147483647, "name": "__i3", "rect": { "x": 0, "y": 0, "width": 1920, "height": 1080 }, "focused": false, "focus": [ 2147483646 ], "border": "none", "current_border_width": 0, "layout": "output", "orientation": "horizontal", "percent": null, "window_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 0, "height": 0 }, "window": null, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "output", "nodes": [ { "id": 2147483646, "name": "__i3_scratch", "rect": { "x": 0, "y": 0, "width": 1920, "height": 1080 }, "focused": false, "focus": [ ], "border": "none", "current_border_width": 0, "layout": "splith", "orientation": "horizontal", "percent": null, "window_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 0, "height": 0 }, "window": null, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "workspace" } ] }, { "id": 3, "name": "eDP-1", "rect": { "x": 0, "y": 0, "width": 1920, "height": 1080 }, "focused": false, "focus": [ 4 ], "border": "none", "current_border_width": 0, "layout": "output", "orientation": "none", "percent": 1\&.0, "window_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 0, "height": 0 }, "window": null, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "output", "active": true, "primary": false, "make": "Unknown", "model": "0x38ED", "serial": "0x00000000", "scale": 1\&.0, "transform": "normal", "current_workspace": "1", "modes": [ { "width": 1920, "height": 1080, "refresh": 60052 } ], "current_mode": { "width": 1920, "height": 1080, "refresh": 60052 }, "nodes": [ { "id": 4, "name": "1", "rect": { "x": 0, "y": 23, "width": 1920, "height": 1057 }, "focused": false, "focus": [ 6, 5 ], "border": "none", "current_border_width": 0, "layout": "splith", "orientation": "horizontal", "percent": null, "window_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 0, "height": 0 }, "window": null, "urgent": false, "floating_nodes": [ ], "sticky": false, "num": 1, "output": "eDP-1", "type": "workspace", "representation": "H[URxvt termite]", "nodes": [ { "id": 5, "name": "urxvt", "rect": { "x": 0, "y": 23, "width": 960, "height": 1057 }, "focused": false, "focus": [ ], "border": "normal", "current_border_width": 2, "layout": "none", "orientation": "none", "percent": 0\&.5, "window_rect": { "x": 2, "y": 0, "width": 956, "height": 1030 }, "deco_rect": { "x": 0, "y": 0, "width": 960, "height": 25 }, "geometry": { "x": 0, "y": 0, "width": 1124, "height": 422 }, "window": 4194313, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "con", "fullscreen_mode": 0, "pid": 23959, "app_id": null, "visible": true, "shell": "xwayland", "inhibit_idle": true, "idle_inhibitors": { "application": "none", "user": "visible", }, "window_properties": { "class": "URxvt", "instance": "urxvt", "title": "urxvt", "transient_for": null }, "nodes": [ ] }, { "id": 6, "name": "", "rect": { "x": 960, "y": 23, "width": 960, "height": 1057 }, "focused": true, "focus": [ ], "border": "normal", "current_border_width": 2, "layout": "none", "orientation": "none", "percent": 0\&.5, "window_rect": { "x": 2, "y": 0, "width": 956, "height": 1030 }, "deco_rect": { "x": 0, "y": 0, "width": 960, "height": 25 }, "geometry": { "x": 0, "y": 0, "width": 817, "height": 458 }, "window": null, "urgent": false, "floating_nodes": [ ], "sticky": false, "type": "con", "fullscreen_mode": 0, "pid": 25370, "app_id": "termite", "visible": true, "shell": "xdg_shell", "inhibit_idle": false, "idle_inhibitors": { "application": "none", "user": "fullscreen", }, "nodes": [ ] } ] } ] } ] } .fi .RE .PP .SS 5. GET_MARKS .PP \fBMESSAGE\fR .br Retrieve the currently set marks .PP \fBREPLY\fR .br An array of marks currently set.\& Since each mark can only be set for one container, this is a set so each value is unique and the order is undefined.\& .PP \fBExample Reply:\fR .nf .RS 4 [ "one", "test" ] .fi .RE .PP .SS 6. GET_BAR_CONFIG (WITHOUT A PAYLOAD) .PP \fBMESSAGE\fR .br When sending without a payload, this retrieves the list of configured bar IDs .PP \fBREPLY\fR .br An array of bar IDs, which are strings .PP \fBExample Reply:\fR .nf .RS 4 [ "bar-0", "bar-1" ] .fi .RE .PP .SS 6. GET_BAR_CONFIG (WITH A PAYLOAD) .PP \fBMESSAGE\fR .br When sent with a bar ID as the payload, this retrieves the config associated with the bar ID specified in the payload.\& This is used by swaybar, but could also be used for third-party bars .PP \fBREPLY\fR .br An object that represents the configuration for the bar with the bar ID sent as the payload.\& The following properties exist, with more information about their values in \fBsway-bar\fR(5): .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ id T} T{ string T} T{ The bar ID T} T{ mode T} T{ string T} T{ The mode for the bar.\& It can be \fIdock\fR, \fIhide\fR, or \fIinvisible\fR T} T{ position T} T{ string T} T{ The bar'\&s position.\& It can currently either be \fIbottom\fR or \fItop\fR T} T{ status_command T} T{ string T} T{ The command which should be run to generate the status line T} T{ font T} T{ string T} T{ The font to use for the text on the bar T} T{ workspace_buttons T} T{ boolean T} T{ Whether to display the workspace buttons on the bar T} T{ workspace_min_width T} T{ integer T} T{ Minimum width in px for the workspace buttons on the bar T} T{ binding_mode_indicator T} T{ boolean T} T{ Whether to display the current binding mode on the bar T} T{ verbose T} T{ boolean T} T{ For i3 compatibility, this will be the boolean value \fIfalse\fR.\& T} T{ colors T} T{ object T} T{ An object containing the \fI#RRGGBBAA\fR colors to use for the bar.\& See below for more information T} T{ gaps T} T{ object T} T{ An object representing the gaps for the bar consisting of \fItop\fR, \fIright\fR, \fIbottom\fR, and \fIleft\fR.\& T} T{ bar_height T} T{ integer T} T{ The absolute height to use for the bar or \fI0\fR to automatically size based on the font T} T{ status_padding T} T{ integer T} T{ The vertical padding to use for the status line T} T{ status_edge_padding T} T{ integer T} T{ The horizontal padding to use for the status line when at the end of an output T} .TE .sp 1 .PP The colors object contains the following properties, which are all strings containing the \fI#RRGGBBAA\fR representation of the color: .TS allbox;c c c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l. T{ \fBPROPERTY\fR T} T{ \fBDESCRIPTION\fR T} T{ background T} T{ The color to use for the bar background on unfocused outputs T} T{ statusline T} T{ The color to use for the status line text on unfocused outputs T} T{ separator T} T{ The color to use for the separator text on unfocused outputs T} T{ focused_background T} T{ The color to use for the background of the bar on the focused output T} T{ focused_statusline T} T{ The color to use for the status line text on the focused output T} T{ focused_separator T} T{ The color to use for the separator text on the focused output T} T{ focused_workspace_text T} T{ The color to use for the text of the focused workspace button T} T{ focused_workspace_bg T} T{ The color to use for the background of the focused workspace button T} T{ focused_workspace_border T} T{ The color to use for the border of the focused workspace button T} T{ active_workspace_text T} T{ The color to use for the text of the workspace buttons for the visible workspaces on unfocused outputs T} T{ active_workspace_bg T} T{ The color to use for the background of the workspace buttons for the visible workspaces on unfocused outputs T} T{ active_workspace_border T} T{ The color to use for the border of the workspace buttons for the visible workspaces on unfocused outputs T} T{ inactive_workspace_text T} T{ The color to use for the text of the workspace buttons for workspaces that are not visible T} T{ inactive_workspace_bg T} T{ The color to use for the background of the workspace buttons for workspaces that are not visible T} T{ inactive_workspace_border T} T{ The color to use for the border of the workspace buttons for workspaces that are not visible T} T{ urgent_workspace_text T} T{ The color to use for the text of the workspace buttons for workspaces that contain an urgent window T} T{ urgent_workspace_bg T} T{ The color to use for the background of the workspace buttons for workspaces that contain an urgent window T} T{ urgent_workspace_border T} T{ The color to use for the border of the workspace buttons for workspaces that contain an urgent window T} T{ binding_mode_text T} T{ The color to use for the text of the binding mode indicator T} T{ binding_mode_bg T} T{ The color to use for the background of the binding mode indicator T} T{ binding_mode_border T} T{ The color to use for the border of the binding mode indicator T} .TE .sp 1 .PP \fBExample Reply:\fR .nf .RS 4 { "id": "bar-0", "mode": "dock", "position": "top", "status_command": "while date +\&'%Y-%m-%d %l:%M:%S %p\&'; do sleep 1; done", "font": "monospace 10", "gaps": { "top": 0, "right": 0, "bottom": 0, "left": 0 }, "bar_height": 0, "status_padding": 1, "status_edge_padding": 3, "workspace_buttons": true, "workspace_min_width": 0, "binding_mode_indicator": true, "verbose": false, "pango_markup": false, "colors": { "background": "#323232ff", "statusline": "#ffffffff", "separator": "#666666ff", "focused_background": "#323232ff", "focused_statusline": "#ffffffff", "focused_separator": "#666666ff", "focused_workspace_border": "#4c7899ff", "focused_workspace_bg": "#285577ff", "focused_workspace_text": "#ffffffff", "inactive_workspace_border": "#32323200", "inactive_workspace_bg": "#32323200", "inactive_workspace_text": "#5c5c5cff", "active_workspace_border": "#333333ff", "active_workspace_bg": "#5f676aff", "active_workspace_text": "#ffffffff", "urgent_workspace_border": "#2f343aff", "urgent_workspace_bg": "#900000ff", "urgent_workspace_text": "#ffffffff", "binding_mode_border": "#2f343aff", "binding_mode_bg": "#900000ff", "binding_mode_text": "#ffffffff" }, } .fi .RE .PP .SS 7. GET_VERSION .PP \fBMESSAGE\fR .br Retrieve version information about the sway process .PP \fBREPLY\fR .br An object containing the following properties: .PP .TS allbox;c c c c c l c c l c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ major T} T{ integer T} T{ The major version of the sway process T} T{ minor T} T{ integer T} T{ The minor version of the sway process T} T{ patch T} T{ integer T} T{ The patch version of the sway process T} T{ human_readable T} T{ string T} T{ A human readable version string that will likely contain more useful information such as the git commit short hash and git branch T} T{ loaded_config_file_name T} T{ string T} T{ The path to the loaded config file T} .TE .sp 1 .PP \fBExample Reply:\fR .nf .RS 4 { "human_readable": "1\&.0-rc1-117-g2f7247e0 (Feb 24 2019, branch \&'master\&')", "major": 1, "minor": 0, "patch": 0, "loaded_config_file_name": "/home/redsoxfan/\&.config/sway/config" } .fi .RE .PP .SS 8. GET_BINDING_MODES .PP \fBMESSAGE\fR .br Retrieve the list of binding modes that are currently configured .PP \fBREPLY\fR .br An array of strings, with each string being the name of a binding mode.\& This will always contain at least one mode (currently \fIdefault\fR), which is the default binding mode .PP \fBExample Reply:\fR .nf .RS 4 [ "default", "resize", ] .fi .RE .PP .SS 9. GET_CONFIG .PP \fBMESSAGE\fR .br Retrieve the contents of the config that was last loaded .PP \fBREPLY\fR .br An object with a single string property containing the contents of the config .PP \fBExample Reply:\fR .nf .RS 4 { "config": "set $mod Mod4\\nbindsym $mod+q exit\\n" } .fi .RE .PP .SS 10. SEND_TICK .PP \fBMESSAGE\fR .br Issues a \fITICK\fR event to all clients subscribing to the event to ensure that all events prior to the tick were received.\& If a payload is given, it will be included in the \fITICK\fR event .PP \fBREPLY\fR .br A single object contains the property \fIsuccess\fR, which is a boolean value indicating whether the \fITICK\fR event was sent.\& .PP \fBExample Reply:\fR .nf .RS 4 { "success": true } .fi .RE .PP .SS 11. SYNC .PP \fBMESSAGE\fR .br For i3 compatibility, this command will just return a failure object since it does not make sense to implement in sway due to the X11 nature of the command.\& If you are curious about what this IPC command does in i3, refer to the i3 documentation.\& .PP \fBREPLY\fR .br A single object that contains the property \fIsuccess\fR, which is set to the boolean value \fIfalse\fR.\& .PP \fBExact Reply:\fR .nf .RS 4 { "success": false } .fi .RE .PP .SS 12. GET_BINDING_STATE .PP \fBMESSAGE\fR .br Returns the currently active binding mode.\& .PP \fBREPLY\fR .br A single object that contains the property \fIname\fR, which is set to the currently active binding mode as a string.\& .PP \fBExample Reply:\fR .nf .RS 4 { "name": "default" } .fi .RE .PP .PP .SS 100. GET_INPUTS .PP \fBMESSAGE\fR .br Retrieve a list of the input devices currently available .PP \fBREPLY\fR .br An array of objects corresponding to each input device.\& Each object has the following properties: .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ identifier T} T{ string T} T{ The identifier for the input device T} T{ name T} T{ string T} T{ The human readable name for the device T} T{ vendor T} T{ integer T} T{ The vendor code for the input device T} T{ product T} T{ integer T} T{ The product code for the input device T} T{ type T} T{ string T} T{ The device type.\& Currently this can be \fIkeyboard\fR, \fIpointer\fR, \fItouch\fR, \fItablet_tool\fR, \fItablet_pad\fR, or \fIswitch\fR T} T{ xkb_active_layout_name T} T{ string T} T{ (Only keyboards) The name of the active keyboard layout T} T{ xkb_layout_names T} T{ array T} T{ (Only keyboards) A list a layout names configured for the keyboard T} T{ xkb_active_layout_index T} T{ integer T} T{ (Only keyboards) The index of the active keyboard layout T} T{ scroll_factor T} T{ floating T} T{ (Only pointers) Multiplier applied on scroll event values.\& T} T{ libinput T} T{ object T} T{ (Only libinput devices) An object describing the current device settings.\& See below for more information T} .TE .sp 1 The \fIlibinput\fR object describes the device configuration for libinput devices.\& Only properties that are supported for the device will be added to the object.\& In addition to the possible options listed, all string properties may also be \fIunknown\fR, in the case that a new option is added to libinput.\& See \fBsway-input\fR(5) for information on the meaning of the possible values.\& The following properties will be included for devices that support them: .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ send_events T} T{ string T} T{ Whether events are being sent by the device.\& It can be \fIenabled\fR, \fIdisabled\fR, or \fIdisabled_on_external_mouse\fR T} T{ tap T} T{ string T} T{ Whether tap to click is enabled.\& It can be \fIenabled\fR or \fIdisabled\fR T} T{ tap_button_map T} T{ string T} T{ The finger to button mapping in use for tapping.\& It can be \fIlmr\fR or \fIlrm\fR T} T{ tap_drag T} T{ string T} T{ Whether tap-and-drag is enabled.\& It can be \fIenabled\fR or \fIdisabled\fR T} T{ tap_drag_lock T} T{ string T} T{ Whether drag-lock is enabled.\& It can be \fIenabled\fR, \fIdisabled\fR or \fIenabled_sticky\fR T} T{ accel_speed T} T{ double T} T{ The pointer-acceleration in use T} T{ accel_profile T} T{ string T} T{ The acceleration profile in use.\& It can be \fInone\fR, \fIflat\fR, or \fIadaptive\fR T} T{ natural_scroll T} T{ string T} T{ Whether natural scrolling is enabled.\& It can be \fIenabled\fR or \fIdisabled\fR T} T{ left_handed T} T{ string T} T{ Whether left-handed mode is enabled.\& It can be \fIenabled\fR or \fIdisabled\fR T} T{ click_method T} T{ string T} T{ The click method in use.\& It can be \fInone\fR, \fIbutton_areas\fR, or \fIclickfinger\fR T} T{ click_button_map T} T{ string T} T{ The finger to button mapping in use for clickfinger.\& It can be \fIlmr\fR or \fIlrm\fR T} T{ middle_emulation T} T{ string T} T{ Whether middle emulation is enabled.\& It can be \fIenabled\fR or \fIdisabled\fR T} T{ scroll_method T} T{ string T} T{ The scroll method in use.\& It can be \fInone\fR, \fItwo_finger\fR, \fIedge\fR, or \fIon_button_down\fR T} T{ scroll_button T} T{ int T} T{ The scroll button to use when \fIscroll_method\fR is \fIon_button_down\fR.\& This will be given as an input event code T} T{ scroll_button_lock T} T{ string T} T{ Whether scroll button lock is enabled.\& It can be \fIenabled\fR or \fIdisabled\fR T} T{ dwt T} T{ string T} T{ Whether disable-while-typing is enabled.\& It can be \fIenabled\fR or \fIdisabled\fR T} T{ dwtp T} T{ string T} T{ Whether disable-while-trackpointing is enabled.\& It can be \fIenabled\fR or_disabled_ T} T{ calibration_matrix T} T{ array T} T{ An array of 6 floats representing the calibration matrix for absolute devices such as touchscreens T} .TE .sp 1 .PP \fBExample Reply:\fR .nf .RS 4 [ { "identifier": "1:1:AT_Translated_Set_2_keyboard", "name": "AT Translated Set 2 keyboard", "vendor": 1, "product": 1, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } }, { "identifier": "1267:5:Elan_Touchpad", "name": "Elan Touchpad", "vendor": 1267, "product": 5, "type": "pointer", "libinput": { "send_events": "enabled", "tap": "enabled", "tap_button_map": "lmr", "tap_drag": "enabled", "tap_drag_lock": "disabled", "accel_speed": 0\&.0, "accel_profile": "none", "natural_scroll", "disabled", "left_handed": "disabled", "click_method": "button_areas", "middle_emulation": "disabled", "scroll_method": "edge", "dwt": "enabled", "dwtp": "enabled" } }, { "identifier": "3034:22494:USB2\&.0_VGA_UVC_WebCam:_USB2\&.0_V", "name": "USB2\&.0 VGA UVC WebCam: USB2\&.0 V", "vendor": 3034, "product": 22494, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } }, { "identifier": "0:3:Sleep_Button", "name": "Sleep Button", "vendor": 0, "product": 3, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } }, { "identifier": "0:5:Lid_Switch", "name": "Lid Switch", "vendor": 0, "product": 5, "type": "switch", "libinput": { "send_events": "enabled" } }, { "identifier": "0:6:Video_Bus", "name": "Video Bus", "vendor": 0, "product": 6, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } }, { "identifier": "0:1:Power_Button", "name": "Power Button", "vendor": 0, "product": 1, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } } ] .fi .RE .PP .SS 101. GET_SEATS .PP \fBMESSAGE\fR .br Retrieve a list of the seats currently configured .PP \fBREPLY\fR .br An array of objects corresponding to each seat.\& There will always be at least one seat.\& Each object has the following properties: .PP .TS allbox;c c c c c r c c r c c r c c r. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ name T} T{ string T} T{ The unique name for the seat T} T{ capabilities T} T{ integer T} T{ The number of capabilities that the seat has T} T{ focus T} T{ integer T} T{ The id of the node currently focused by the seat or \fI0\fR when the seat is not currently focused by a node (i.\&e.\& a surface layer or xwayland unmanaged has focus) T} T{ devices T} T{ array T} T{ An array of input devices that are attached to the seat.\& Currently, this is an array of objects that are identical to those returned by \fIGET_INPUTS\fR T} .TE .sp 1 .PP \fBExample Reply:\fR .nf .RS 4 [ { "name": "seat0", "capabilities": 3, "focus": 7, "devices": [ { "identifier": "1:1:AT_Translated_Set_2_keyboard", "name": "AT Translated Set 2 keyboard", "vendor": 1, "product": 1, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } }, { "identifier": "1267:5:Elan_Touchpad", "name": "Elan Touchpad", "vendor": 1267, "product": 5, "type": "pointer", "libinput": { "send_events": "enabled", "tap": "enabled", "tap_button_map": "lmr", "tap_drag": "enabled", "tap_drag_lock": "disabled", "accel_speed": 0\&.0, "accel_profile": "none", "natural_scroll", "disabled", "left_handed": "disabled", "click_method": "button_areas", "middle_emulation": "disabled", "scroll_method": "edge", "dwt": "enabled", "dwtp": "enabled" } }, { "identifier": "3034:22494:USB2\&.0_VGA_UVC_WebCam:_USB2\&.0_V", "name": "USB2\&.0 VGA UVC WebCam: USB2\&.0 V", "vendor": 3034, "product": 22494, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } }, { "identifier": "0:3:Sleep_Button", "name": "Sleep Button", "vendor": 0, "product": 3, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } }, { "identifier": "0:5:Lid_Switch", "name": "Lid Switch", "vendor": 0, "product": 5, "type": "switch", "libinput": { "send_events": "enabled" } }, { "identifier": "0:6:Video_Bus", "name": "Video Bus", "vendor": 0, "product": 6, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } }, { "identifier": "0:1:Power_Button", "name": "Power Button", "vendor": 0, "product": 1, "type": "keyboard", "xkb_active_layout_name": "English (US)", "libinput": { "send_events": "enabled" } } ] } ] .fi .RE .PP .SH EVENTS .PP Events are a way for clients to get notified of changes to sway.\& A client can subscribe to any events it wants to be notified of changes for.\& The event is sent in the same format as a reply.\& The following events are currently available: .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l c c l c c l c c l c c l. T{ \fBEVENT TYPE\fR T} T{ \fBNAME\fR T} T{ \fBDESCRIPTION\fR T} T{ 0x80000000 T} T{ workspace T} T{ Sent whenever an event involving a workspace occurs such as initialization of a new workspace or another workspace gaining focus T} T{ 0x80000001 T} T{ output T} T{ Sent when outputs are updated T} T{ 0x80000002 T} T{ mode T} T{ Sent whenever the binding mode changes T} T{ 0x80000003 T} T{ window T} T{ Sent whenever an event involving a window occurs such as it being reparented, focused, or closed T} T{ 0x80000004 T} T{ barconfig_update T} T{ Sent whenever a bar config changes T} T{ 0x80000005 T} T{ binding T} T{ Sent when a configured binding is executed T} T{ 0x80000006 T} T{ shutdown T} T{ Sent when the ipc shuts down because sway is exiting T} T{ 0x80000007 T} T{ tick T} T{ Sent when an ipc client sends a \fISEND_TICK\fR message T} T{ 0x80000014 T} T{ bar_state_update T} T{ Sent when the visibility of a bar should change due to a modifier T} T{ 0x80000015 T} T{ input T} T{ Sent when something related to input devices changes T} .TE .sp 1 .PP .SS 0x80000000. WORKSPACE .PP Sent whenever a change involving a workspace occurs.\& The event consists of a single object with the following properties: .PP .TS allbox;c c c c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ change T} T{ string T} T{ The type of change that occurred.\& See below for more information T} T{ current T} T{ object T} T{ An object representing the affected workspace or \fInull\fR for \fIreload\fR changes T} T{ old T} T{ object T} T{ For a \fIfocus\fR change, this will be an object representing the workspace being switched from.\& Otherwise, it is \fInull\fR T} .TE .sp 1 .PP The following change types are currently available: .TS allbox;c c c l c l c l c l c l c l c l. T{ \fBTYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ init T} T{ The workspace was created T} T{ empty T} T{ The workspace is empty and is being destroyed since it is not visible T} T{ focus T} T{ The workspace was focused.\& See the \fIold\fR property for the previous focus T} T{ move T} T{ The workspace was moved to a different output T} T{ rename T} T{ The workspace was renamed T} T{ urgent T} T{ A window on the workspace has had its urgency hint set or all urgency hints for windows on the workspace have been cleared T} T{ reload T} T{ The configuration file has been reloaded T} .TE .sp 1 .PP \fBExample Event:\fR .nf .RS 4 { "change": "init", "old": null, "current": { "id": 10, "name": "2", "rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "focused": false, "focus": [ ], "border": "none", "current_border_width": 0, "layout": "splith", "percent": null, "window_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 0, "height": 0 }, "window": null, "urgent": false, "floating_nodes": [ ], "num": 2, "output": "eDP-1", "type": "workspace", "representation": null, "nodes": [ ] } } .fi .RE .PP .SS 0x80000001. OUTPUT .PP Sent whenever an output is added, removed, or its configuration is changed.\& The event is a single object with the property \fIchange\fR, which is a string containing the reason for the change.\& Currently, the only value for \fIchange\fR is \fIunspecified\fR.\& .PP \fBExample Event:\fR .nf .RS 4 { "change": "unspecified" } .fi .RE .PP .SS 0x80000002. MODE .PP Sent whenever the binding mode changes.\& The event consists of a single object with the following properties: .PP .TS allbox;c c c c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ change T} T{ string T} T{ The binding mode that became active T} T{ pango_markup T} T{ boolean T} T{ Whether the mode should be parsed as pango markup T} .TE .sp 1 .PP \fBExample Event:\fR .nf .RS 4 { "change": "default", "pango_markup": false } .fi .RE .PP .SS 0x80000003. WINDOW .PP Sent whenever a change involving a window occurs.\& The event consists of a single object with the following properties: .PP .TS allbox;c c c c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ change T} T{ string T} T{ The type of change that occurred.\& See below for more information T} T{ container T} T{ object T} T{ An object representing the affected window T} .TE .sp 1 .PP The following change types are currently available: .TS allbox;c c c l c l c l c l c l c l c l c l c l. T{ \fBTYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ new T} T{ The window was created T} T{ close T} T{ The window was closed T} T{ focus T} T{ The window was focused T} T{ title T} T{ The window'\&s title has changed T} T{ fullscreen_mode T} T{ The window'\&s fullscreen mode has changed T} T{ move T} T{ The window has been reparented in the tree T} T{ floating T} T{ The window has become floating or is no longer floating T} T{ urgent T} T{ The window'\&s urgency hint has changed status T} T{ mark T} T{ A mark has been added or removed from the window T} .TE .sp 1 .PP \fBExample Event:\fR .nf .RS 4 { "change": "new", "container": { "id": 12, "name": null, "rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "focused": false, "focus": [ ], "border": "none", "current_border_width": 0, "layout": "none", "percent": 0\&.0, "window_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 1124, "height": 422 }, "window": 4194313, "urgent": false, "floating_nodes": [ ], "type": "con", "pid": 19787, "app_id": null, "window_properties": { "class": "URxvt", "instance": "urxvt", "transient_for": null }, "nodes": [ ] } } .fi .RE .PP .SS 0x80000004. BARCONFIG_UPDATE .PP Sent whenever a config for a bar changes.\& The event is identical to that of \fIGET_BAR_CONFIG\fR when a bar ID is given as a payload.\& See \fI6.\& GET_BAR_CONFIG (WITH A PAYLOAD)\fR above for more information.\& .PP .SS 0x80000005. BINDING .PP Sent whenever a binding is executed.\& The event is a single object with the following properties: .PP .TS allbox;c c c c c l c c l c c l c c l c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ change T} T{ string T} T{ The change that occurred for the binding.\& Currently this will only be \fIrun\fR T} T{ command T} T{ string T} T{ The command associated with the binding T} T{ event_state_mask T} T{ array T} T{ An array of strings that correspond to each modifier key for the binding T} T{ input_code T} T{ integer T} T{ For keyboard bindcodes, this is the key code for the binding.\& For mouse bindings, this is the X11 button number, if there is an equivalent.\& In all other cases, this will be \fI0\fR.\& T} T{ symbol T} T{ string T} T{ For keyboard bindsyms, this is the bindsym for the binding.\& Otherwise, this will be \fInull\fR T} T{ input_type T} T{ string T} T{ The input type that triggered the binding.\& This is either \fIkeyboard\fR or \fImouse\fR T} .TE .sp 1 .PP \fBExample Event:\fR .nf .RS 4 { "change": "run", "binding": { "command": "workspace 2", "event_state_mask": [ "Mod4" ], "input_code": 0, "symbol": "2", "input_type": "keyboard" } } .fi .RE .PP .SS 0x80000006. SHUTDOWN .PP Sent whenever the IPC is shutting down.\& The event is a single object with the property \fIchange\fR, which is a string containing the reason for the shutdown.\& Currently, the only value for \fIchange\fR is \fIexit\fR, which is issued when sway is exiting.\& .PP \fBExample Event:\fR .nf .RS 4 { "change": "exit" } .fi .RE .PP .SS 0x80000007. TICK .PP Sent when first subscribing to tick events or by a \fISEND_TICK\fR message.\& The event is a single object with the following properties: .PP .TS allbox;c c c c c c c c c. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ first T} T{ boolean T} T{ Whether this event was triggered by subscribing to the tick events T} T{ payload T} T{ string T} T{ The payload provided in a \fISEND_TICK\fR message, if any.\& Otherwise, an empty string T} .TE .sp 1 .PP \fBExample Event:\fR .nf .RS 4 { "first": true "payload": "" } .fi .RE .PP .SS 0x80000014. BAR_STATE_UPDATE .PP Sent when the visibility of a bar changes due to a modifier being pressed.\& The event is a single object with the following properties: .PP .TS allbox;c c c c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ id T} T{ string T} T{ The bar ID affected T} T{ visible_by_modifier T} T{ boolean T} T{ Whether the bar should be made visible due to a modifier being pressed T} .TE .sp 1 .PP \fBExample Event:\fR .nf .RS 4 { "id": "bar-0", "visible_by_modifier": true } .fi .RE .PP .SS 0x80000015. INPUT .PP Sent when something related to input devices changes.\& The event is a single object with the following properties: .PP .TS allbox;c c c c c l c c l. T{ \fBPROPERTY\fR T} T{ \fBDATA TYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ change T} T{ string T} T{ What has changed T} T{ input T} T{ object T} T{ An object representing the input that is identical to the ones GET_INPUTS gives T} .TE .sp 1 The following change types are currently available: .TS allbox;c c c l c l c l c l c l. T{ \fBTYPE\fR T} T{ \fBDESCRIPTION\fR T} T{ added T} T{ The input device became available T} T{ removed T} T{ The input device is no longer available T} T{ xkb_keymap T} T{ (Keyboards only) The keymap for the keyboard has changed T} T{ xkb_layout T} T{ (Keyboards only) The effective layout in the keymap has changed T} T{ libinput_config T} T{ (libinput device only) A libinput config option for the device changed T} .TE .sp 1 \fBExample Event:\fR .nf .RS 4 { "change": "xkb_layout", "input": { "identifier": "1:1:AT_Translated_Set_2_keyboard", "name": "AT Translated Set 2 keyboard", "vendor": 1, "product": 1, "type": "keyboard", "xkb_layout_names": [ "English (US)", "English (Dvorak)" ], "xkb_active_layout_index": 1, "xkb_active_layout_name": "English (Dvorak)", "libinput": { "send_events": "enabled" } } } .fi .RE .PP .SH SEE ALSO .PP \fBsway\fR(1) \fBsway\fR(5) \fBsway-bar\fR(5) \fBswaymsg\fR(1) \fBsway-input\fR(5) \fBsway-output\fR(5)