swaymsg
Send messages to a running instance of Sway using IPC. tldr-pages
On several platforms
Several platforms
Send messages to a running instance of Sway using IPC. See <https://github.com/swaywm/sway/blob/master/sway/sway.5.scd> for available commands.
Run a Sway command
swaymsg commandIdentifyDisplay a list of workspaces
swaymsg --type get_workspacesIdentifyDisplay a list of input devices
swaymsg --type get_inputsIdentifyDisplay a list of output devices
swaymsg --type get_outputsIdentifyDisplay a layout tree of all open windows, containers, outputs, and workspaces
swaymsg --type get_treeIdentify