-
Notifications
You must be signed in to change notification settings - Fork 2
/
i3-msg.man
136 lines (95 loc) · 3.39 KB
/
i3-msg.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
i3-msg(1)
=========
Michael Stapelberg <michael@i3wm.org>
v4.2, August 2012
== NAME
i3-msg - send messages to i3 window manager
== SYNOPSIS
i3-msg [-q] [-v] [-h] [-s socket] [-t type] [-r] [message]
== OPTIONS
*-q, --quiet*::
Only send ipc message and suppress the output of the response.
*-v, --version*::
Display version number and exit.
*-h, --help*::
Display a short help-message and exit.
*-s, --socket* 'sock_path'::
i3-msg will use the environment variable I3SOCK or the socket path
given here. If both fail, it will try to get the socket information
from the root window and then try /tmp/i3-ipc.sock before exiting
with an error.
*-t* 'type'::
Send ipc message, see below. This option defaults to "command".
*-m*, *--monitor*::
Instead of exiting right after receiving the first subscribed event,
wait indefinitely for all of them. Can only be used with "-t subscribe".
See the "subscribe" IPC message type below for details.
*-r, --raw*::
Display the raw JSON reply instead of pretty-printing errors (for commands) or
displaying the top-level config file contents (for GET_CONFIG).
*message*::
Send ipc message, see below.
== IPC MESSAGE TYPES
command::
The payload of the message is a command for i3 (like the commands you can bind
to keys in the configuration file) and will be executed directly after
receiving it.
get_workspaces::
Gets the current workspaces. The reply will be a JSON-encoded list of
workspaces.
get_outputs::
Gets the current outputs. The reply will be a JSON-encoded list of outputs (see
the reply section of docs/ipc, e.g. at
https://i3wm.org/docs/ipc.html#_receiving_replies_from_i3).
get_tree::
Gets the layout tree. i3 uses a tree as data structure which includes every
container. The reply will be the JSON-encoded tree.
get_marks::
Gets a list of marks (identifiers for containers to easily jump to them later).
The reply will be a JSON-encoded list of window marks.
get_bar_config::
Gets the configuration (as JSON map) of the workspace bar with the given ID. If
no ID is provided, an array with all configured bar IDs is returned instead.
get_binding_modes::
Gets a list of configured binding modes.
get_version::
Gets the version of i3. The reply will be a JSON-encoded dictionary with the
major, minor, patch and human-readable version.
get_config::
Gets the currently loaded i3 configuration.
send_tick::
Sends a tick to all IPC connections which subscribe to tick events.
subscribe::
The payload of the message describes the events to subscribe to.
Upon reception, each event will be dumped as a JSON-encoded object.
See the -m option for continuous monitoring.
== DESCRIPTION
i3-msg is a sample implementation for a client using the unix socket IPC
interface to i3.
=== Exit status:
0:
if OK,
1:
if invalid syntax or unable to connect to ipc-socket
2:
if i3 returned an error processing your command(s)
== EXAMPLES
------------------------------------------------
# Use 1-px border for current client
i3-msg "border 1pixel"
# You can leave out the quotes
i3-msg border normal
# Dump the layout tree
i3-msg -t get_tree
# Monitor window changes
i3-msg -t subscribe -m '[ "window" ]'
------------------------------------------------
== ENVIRONMENT
=== I3SOCK
If no ipc-socket is specified on the commandline, this variable is used
to determine the path, at which the unix domain socket is expected, on which
to connect to i3.
== SEE ALSO
i3(1)
== AUTHOR
Michael Stapelberg and contributors