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] [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       message
36           Send ipc message, see below.
37

IPC MESSAGE TYPES

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

DESCRIPTION

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

EXAMPLES

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

ENVIRONMENT

106   I3SOCK
107       If no ipc-socket is specified on the commandline, this variable is used
108       to determine the path, at which the unix domain socket is expected, on
109       which to connect to i3.
110

SEE ALSO

112       i3(1)
113

AUTHOR

115       Michael Stapelberg and contributors
116
117
118
119i3 4.19.1                         02/01/2021                         I3-MSG(1)
Impressum