snippetbashTip
swaymsg — Send messages to a running instance of Sway using IPC. See <https://github.com/swaywm/sway/blob/mast
Viewed 0 times
commandsendclirunningmessagesinstanceswaymsgsway
Problem
How to use the
swaymsg command: 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. More information: <https://github.com/swaywm/sway/blob/master/swaymsg/swaymsg.1.scd>.Solution
swaymsg — 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. More information: <https://github.com/swaywm/sway/blob/master/swaymsg/swaymsg.1.scd>.Run a Sway command:
swaymsg {{command}}Display a list of workspaces:
swaymsg {{[-t|--type]}} get_workspacesDisplay a list of input devices:
swaymsg {{[-t|--type]}} get_inputsDisplay a list of output devices:
swaymsg {{[-t|--type]}} get_outputsDisplay a layout tree of all open windows, containers, outputs, and workspaces:
swaymsg {{[-t|--type]}} get_treeCode Snippets
Run a Sway command
swaymsg {{command}}Display a list of workspaces
swaymsg {{[-t|--type]}} get_workspacesDisplay a list of input devices
swaymsg {{[-t|--type]}} get_inputsDisplay a list of output devices
swaymsg {{[-t|--type]}} get_outputsDisplay a layout tree of all open windows, containers, outputs, and workspaces
swaymsg {{[-t|--type]}} get_treeContext
tldr-pages: common/swaymsg
Revisions (0)
No revisions yet.