1I3-MSG(1)                          i3 Manual                         I3-MSG(1)
2
3
4

NAME

6       i3-msg - send messages to i3 window manager
7

SYNOPSIS

9       i3-msg [-q] [-v] [-h] [-s socket] [-t type] [-r] [message]
10

OPTIONS

12       -q, --quiet
13           Only send ipc message and suppress the output of the response.
14
15       -v, --version
16           Display version number and exit.
17
18       -h, --help
19           Display a short help-message and exit.
20
21       -s, --socket sock_path
22           i3-msg will use the environment variable I3SOCK or the socket path
23           given here. If both fail, it will try to get the socket information
24           from the root window and then try /tmp/i3-ipc.sock before exiting
25           with an error.
26
27       -t type
28           Send ipc message, see below. This option defaults to "command".
29
30       -m, --monitor
31           Instead of exiting right after receiving the first subscribed
32           event, wait indefinitely for all of them. Can only be used with "-t
33           subscribe". See the "subscribe" IPC message type below for details.
34
35       -r, --raw
36           Display the raw JSON reply instead of pretty-printing errors (for
37           commands) or displaying the top-level config file contents (for
38           GET_CONFIG).
39
40       message
41           Send ipc message, see below.
42

IPC MESSAGE TYPES

44       command
45           The payload of the message is a command for i3 (like the commands
46           you can bind to keys in the configuration file) and will be
47           executed directly after receiving it.
48
49       get_workspaces
50           Gets the current workspaces. The reply will be a JSON-encoded list
51           of workspaces.
52
53       get_outputs
54           Gets the current outputs. The reply will be a JSON-encoded list of
55           outputs (see the reply section of docs/ipc, e.g. at
56           https://i3wm.org/docs/ipc.html#_receiving_replies_from_i3).
57
58       get_tree
59           Gets the layout tree. i3 uses a tree as data structure which
60           includes every container. The reply will be the JSON-encoded tree.
61
62       get_marks
63           Gets a list of marks (identifiers for containers to easily jump to
64           them later). The reply will be a JSON-encoded list of window marks.
65
66       get_bar_config
67           Gets the configuration (as JSON map) of the workspace bar with the
68           given ID. If no ID is provided, an array with all configured bar
69           IDs is returned instead.
70
71       get_binding_modes
72           Gets a list of configured binding modes.
73
74       get_version
75           Gets the version of i3. The reply will be a JSON-encoded dictionary
76           with the major, minor, patch and human-readable version.
77
78       get_config
79           Gets the currently loaded i3 configuration.
80
81       send_tick
82           Sends a tick to all IPC connections which subscribe to tick events.
83
84       subscribe
85           The payload of the message describes the events to subscribe to.
86           Upon reception, each event will be dumped as a JSON-encoded object.
87           See the -m option for continuous monitoring.
88

DESCRIPTION

90       i3-msg is a sample implementation for a client using the unix socket
91       IPC interface to i3.
92
93   Exit status:
94       0: if OK, 1: if invalid syntax or unable to connect to ipc-socket 2: if
95       i3 returned an error processing your command(s)
96

EXAMPLES

98           # Use 1-px border for current client
99           i3-msg "border 1pixel"
100
101           # You can leave out the quotes
102           i3-msg border normal
103
104           # Dump the layout tree
105           i3-msg -t get_tree
106
107           # Monitor window changes
108           i3-msg -t subscribe -m '[ "window" ]'
109

ENVIRONMENT

111   I3SOCK
112       If no ipc-socket is specified on the commandline, this variable is used
113       to determine the path, at which the unix domain socket is expected, on
114       which to connect to i3.
115

SEE ALSO

117       i3(1)
118

AUTHOR

120       Michael Stapelberg and contributors
121
122
123
124i3 4.20.1                         11/03/2021                         I3-MSG(1)
Impressum