1SWAYMSG(1) SWAYMSG(1)
2
3
4
6 swaymsg - Send messages to a running instance of sway over the IPC
7 socket.
8
10 swaymsg [options] [message]
11
13 -h, --help
14 Show help message and quit.
15
16 -q, --quiet
17 Sends the IPC message but does not print the response from sway.
18
19 -r, --raw
20 Use raw output even if using a tty.
21
22 -s, --socket <path>
23 Use the specified socket path. Otherwise, swaymsg will ask sway
24 where the socket is (which is the value of $SWAYSOCK, then of
25 $I3SOCK).
26
27 -t, --type <type>
28 Specify the type of IPC message. See below.
29
30 -v, --version
31 Print the version (of swaymsg) and quit.
32
34 <command>
35 The message is a sway command (the same commands you can bind to
36 keybindings in your sway config file). It will be executed
37 immediately.
38
39 See sway(5) for a list of commands.
40
41 get_workspaces
42 Gets a JSON-encoded list of workspaces and their status.
43
44 get_inputs
45 Gets a JSON-encoded list of current inputs.
46
47 get_outputs
48 Gets a JSON-encoded list of current outputs.
49
50 get_tree
51 Gets a JSON-encoded layout tree of all open windows, containers,
52 outputs, workspaces, and so on.
53
54 get_marks
55 Get a JSON-encoded list of marks.
56
57 get_bar_config
58 Get a JSON-encoded configuration for swaybar.
59
60 get_version
61 Get JSON-encoded version information for the running instance of
62 sway.
63
64 get_clipboard
65 Get JSON-encoded information about the clipboard. Returns the
66 current clipboard mime-types if called without arguments, otherwise
67 returns the clipboard data in the requested formats. Encodes the
68 data using base64 for non-text mime types.
69
71 Maintained by Drew DeVault <sir@cmpwn.com>, who is assisted by other
72 open source contributors. For more information about sway development,
73 see https://github.com/swaywm/sway.
74
76 sway(5)
77
78
79
80 02/07/2019 SWAYMSG(1)