1swaymsg(1)                  General Commands Manual                 swaymsg(1)
2
3
4

NAME

6       swaymsg - Send messages to a running instance of sway over the IPC
7       socket.
8

SYNOPSIS

10       swaymsg [options...] [message]
11

OPTIONS

13       -h, --help
14           Show help message and quit.
15
16       -m, --monitor
17           Monitor for responses until killed instead of exiting after the
18           first response. This can only be used with the IPC message type
19           subscribe. If there is a malformed response or an invalid event
20           type was requested, swaymsg will stop monitoring and exit.
21
22       -p, --pretty
23           Use raw output even when not using a tty.
24
25       -q, --quiet
26           Sends the IPC message but does not print the response from sway.
27
28       -r, --raw
29           Use raw output even if using a tty.
30
31       -s, --socket <path>
32           Use the specified socket path. Otherwise, swaymsg will ask sway
33           where the socket is (which is the value of $SWAYSOCK, then of
34           $I3SOCK).
35
36       -t, --type <type>
37           Specify the type of IPC message. See below.
38
39       -v, --version
40           Print the version (of swaymsg) and quit.
41

IPC MESSAGE TYPES

43       <command>
44           The message is a sway command (the same commands you can bind to
45           keybindings in your sway config file). It will be executed immedi‐
46           ately.
47
48           See sway(5) for a list of commands.
49
50       get_workspaces
51           Gets a JSON-encoded list of workspaces and their status.
52
53       get_inputs
54           Gets a JSON-encoded list of current inputs.
55
56       get_outputs
57           Gets a JSON-encoded list of current outputs.
58
59       get_tree
60           Gets a JSON-encoded layout tree of all open windows, containers,
61           outputs, workspaces, and so on.
62
63       get_seats
64           Gets a JSON-encoded list of all seats, its properties and all
65           assigned devices.
66
67       get_marks
68           Get a JSON-encoded list of marks.
69
70       get_bar_config
71           Get a JSON-encoded configuration for swaybar.
72
73       get_version
74           Get JSON-encoded version information for the running instance of
75           sway.
76
77       get_binding_modes
78           Gets a JSON-encoded list of currently configured binding modes.
79
80       get_config
81           Gets a JSON-encoded copy of the current configuration.
82
83       send_tick
84           Sends a tick event to all subscribed clients.
85
86       subscribe
87           Subscribe to a list of event types. The argument for this type
88           should be provided in the form of a valid JSON array. If any of the
89           types are invalid or if an valid JSON array is not provided, this
90           will result in an failure.
91

SEE ALSO

93       sway(5) sway-bar(5) sway-input(5) sway-output(5) sway-ipc(7)
94
95
96
97                                  2019-07-27                        swaymsg(1)
Impressum