This new option forces pretty (non-raw/non-JSON) output. By default, when
not using a tty, swaymsg outputs using the "raw" format. This makes it
impossible to, for example, pipe the pretty output to a pager such as
`less` since piping does not use a tty.
The new -p/--pretty option gives the user explicit control over the output
format while retaining the default tty-dependent behavior.
Signed-off-by: Peter Grayson <pete@jpgrayson.net>
master
Peter Grayson6 years agocommitted byBrian Ashworth
complete-c swaymsg -s h -lhelp--description"Show help message and quit."
complete-c swaymsg -s h -lhelp--description"Show help message and quit."
complete-c swaymsg -s p -l pretty --description"Use pretty output even when not using a tty."
complete-c swaymsg -s q -l quiet --description"Sends the IPC message but does not print the response from sway."
complete-c swaymsg -s q -l quiet --description"Sends the IPC message but does not print the response from sway."
complete-c swaymsg -s v -l version --description"Print the version (of swaymsg) and quit."
complete-c swaymsg -s r -l raw --description"Use raw output even if using tty."
complete-c swaymsg -s r -l raw --description"Use raw output even if using tty."
complete-c swaymsg -s s -l socket -r--description"Use the specified socket path. Otherwise, swaymsg will ask where the socket is (which is the value of $SWAYSOCK, then of $I3SOCK)."
complete-c swaymsg -s s -l socket -r--description"Use the specified socket path. Otherwise, swaymsg will ask where the socket is (which is the value of $SWAYSOCK, then of $I3SOCK)."
complete-c swaymsg -s v -l version --description"Print the version (of swaymsg) and quit."
complete-c swaymsg -s t -ltype-fr--description"Specify the type of IPC message."
complete-c swaymsg -s t -ltype-fr--description"Specify the type of IPC message."
complete-c swaymsg -s t -ltype-fra'get_workspaces'--description"Gets a JSON-encoded list of workspaces and their status."
complete-c swaymsg -s t -ltype-fra'get_workspaces'--description"Gets a JSON-encoded list of workspaces and their status."