Commit graph

6 commits

Author SHA1 Message Date
Peter Grayson
331bcac3ea Add get_bindings IPC interface
The new get_bindings IPC interface (IPC_GET_BINDINGS) allows swaymsg (and
other IPC clients) to interrogate sway's input bindings for all configured
binding modes.

The output of get_bindings is a JSON object mapping each configured binding
mode (e.g. "default", "resize", etc.) to an array of binding objects. The
binding JSON objects are of the same form as those in IPC_EVENT_BINDING.

N.B. a big chunk of code from ipc_event_binding() is moved to a new
ipc_json_describe_binding() function which services both the new
IPC_GET_BINDINGS as well as the existing IPC_EVENT_BINDING commands.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
2019-03-08 14:45:54 -05:00
Peter Grayson
b7fe5097e9 Add -p/--pretty option to swaymsg
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>
2019-03-08 14:29:39 -05:00
Tim Sampson
cdf30033af fish: improve completions a little bit 2019-02-23 09:17:02 +01:00
madblobfish
e47b31c556 document swaymessage type for get_seats 2018-11-04 22:49:44 +01:00
madblobfish
4e20907364 improved swaymsg completions for fish 2018-10-31 17:56:33 +01:00
Martin Kalchev
4f57c3da0e added untested files 2018-08-26 18:53:51 +03:00