Commit graph

12 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
Drew DeVault
3fca8b8d22 Split swaylock into separate project 2019-01-13 21:40:26 -05:00
Drew DeVault
bc808680b1 Split swayidle from sway 2019-01-12 11:24:06 -05:00
Réouven Assouly
1450a9e9f9 completion: use jq instead of sed for swaybar completion 2019-01-02 21:38:32 -05:00
Gaël PORTAY
3b4cf3718b bash: add completion for swaybar 2018-12-31 22:35:57 -05:00
Ian Fan
3edaf2ce2a ipc: add tick event 2018-08-01 16:57:15 +01:00
Ian Fan
33433c6434 Add missing swaymsg completions 2018-08-01 16:57:15 +01:00
Eric Engestrom
c4b4da5dc4 bash: add completion for swayidle 2018-07-30 15:56:15 +01:00
Eric Engestrom
4a8a19d21f bash: add completion for swaylock 2018-07-30 15:56:15 +01:00
Eric Engestrom
21609f8af2 bash: add completion for swaymsg 2018-07-30 15:56:15 +01:00
Eric Engestrom
27e89cf61d bash: add completion for sway 2018-07-30 15:56:15 +01:00