]> git.sur5r.net Git - i3/i3/blob - man/i3-msg.man
Merge branch 'release-4.16.1'
[i3/i3] / man / i3-msg.man
1 i3-msg(1)
2 =========
3 Michael Stapelberg <michael@i3wm.org>
4 v4.2, August 2012
5
6 == NAME
7
8 i3-msg - send messages to i3 window manager
9
10 == SYNOPSIS
11
12 i3-msg  [-q] [-v] [-h] [-s socket] [-t type] [message]
13
14 == OPTIONS
15
16 *-q, --quiet*::
17 Only send ipc message and suppress the output of the response.
18
19 *-v, --version*::
20 Display version number and exit.
21
22 *-h, --help*::
23 Display a short help-message and exit.
24
25 *-s, --socket* 'sock_path'::
26 i3-msg will use the environment variable I3SOCK or the socket path
27 given here. If both fail, it will try to get the socket information
28 from the root window and then try /tmp/i3-ipc.sock before exiting
29 with an error.
30
31 *-t* 'type'::
32 Send ipc message, see below. This option defaults to "command".
33
34 *-m*, *--monitor*::
35 Instead of exiting right after receiving the first subscribed event,
36 wait indefinitely for all of them. Can only be used with "-t subscribe".
37 See the "subscribe" IPC message type below for details.
38
39 *message*::
40 Send ipc message, see below.
41
42 == IPC MESSAGE TYPES
43
44 command::
45 The payload of the message is a command for i3 (like the commands you can bind
46 to keys in the configuration file) and will be executed directly after
47 receiving it.
48
49 get_workspaces::
50 Gets the current workspaces. The reply will be a JSON-encoded list of
51 workspaces.
52
53 get_outputs::
54 Gets the current outputs. The reply will be a JSON-encoded list of outputs (see
55 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 includes every
60 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 them later).
64 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 given ID. If
68 no ID is provided, an array with all configured bar IDs is returned instead.
69
70 get_binding_modes::
71 Gets a list of configured binding modes.
72
73 get_version::
74 Gets the version of i3. The reply will be a JSON-encoded dictionary with the
75 major, minor, patch and human-readable version.
76
77 get_config::
78 Gets the currently loaded i3 configuration.
79
80 send_tick::
81 Sends a tick to all IPC connections which subscribe to tick events.
82
83 subscribe::
84 The payload of the message describes the events to subscribe to.
85 Upon reception, each event will be dumped as a JSON-encoded object.
86 See the -m option for continuous monitoring.
87
88 == DESCRIPTION
89
90 i3-msg is a sample implementation for a client using the unix socket IPC
91 interface to i3.
92
93 == EXAMPLES
94
95 ------------------------------------------------
96 # Use 1-px border for current client
97 i3-msg "border 1pixel"
98
99 # You can leave out the quotes
100 i3-msg border normal
101
102 # Dump the layout tree
103 i3-msg -t get_tree
104
105 # Monitor window changes
106 i3-msg -t subscribe -m '[ "window" ]'
107 ------------------------------------------------
108
109 == ENVIRONMENT
110
111 === I3SOCK
112
113 If no ipc-socket is specified on the commandline, this variable is used
114 to determine the path, at which the unix domain socket is expected, on which
115 to connect to i3.
116
117 == SEE ALSO
118
119 i3(1)
120
121 == AUTHOR
122
123 Michael Stapelberg and contributors