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
Réouven Assouly
cf00fb2ccc zsh: update completions 2019-01-02 21:38:32 -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
emersion
ba3511b243 Remove clipboard command and get_clipboard message 2018-07-10 22:09:21 +01:00
Ryan Dwyer
c72940837c Implement IPC get_seats command 2018-05-12 18:17:36 +10:00
nyorain
c0f2acce4e Rework get_clipboard implementation 2017-07-07 21:51:34 +02:00
Mikkel Oscar Lyderik
6793648f8e use tabs 2016-01-29 03:24:21 +01:00
Mikkel Oscar Lyderik
10e50b690a Improve _swaymsg and _swaygrab completions 2016-01-29 03:06:13 +01:00
Seth Barberee
1ce1fa3d18 refactored to include single dash options 2016-01-26 15:22:17 -06:00
Seth Barberee
fcd0071555 added basic zsh shell completion for sway, swaybg, and swaygrab 2016-01-17 22:06:26 -06:00