In anticipation for #375, reorganized and augmented slightly sway(5)
so it makes a difference between commands intended for configuration,
commands intended for control, and those that can serve as both.
This patch aims to correctly handle moving focus <left|right|up|down>
between outputs.
For instance, if moving from one output to a new output at the left of
the current one, it should focus the right-most view/container on the
new output, and the opposite if moving from right to left. This should
happen regardless of the previously stored focus of the new output.
This also handles moving to a new output above or below the current one.
Calling `exit` in sway_terminate prevents sway from correctly shutting
down (freeing data, cleanly terminating the ipc server, etc.).
A better way is to exit straight away if the failure occurs before
`wlc_run` and use sway_abort as usual if it occur when wlc is running.
Sway used to attempt sending an IPC command composed of every argument
after the first non-option argument encountered.
Now, raises an error if an option is encountered before the intended command.
Some options such as -h or -v take effect when parsing, so they still
apply.
The get-socketpath long option had an undocumented short alternative
as `p`. It has been removed.
However, the code in the options array is still the 'p' char.
This makes sure that a named output config is applied before the
general wildcard config when a new output is created. This ensures that
the config:
output * ...
output NAME ...
behaves the same way as:
output NAME ...
output * ...
This makes IPC GET_PIXELS use the new `wlc_pixels_read` call instead of
the deprecated `wlc_output_get_pixels`.
The old version worked by passing a callback function to wlc which would
grab the pixels and send them to the IPC client.
The new version works by maintaining a list of clients who have
requested the pixels of some output and then grap and send the pixels in
the output_post_render hook of the `wlc_interface`.
There is only a slight issue. When using a transparent color the views
are arranged to make room for swaylock which we can now see. I tried removing
the arrange call but that just made it worse by putting in an opaque view on the
workspace and not making the lockoverlay color. Ill raise an issue if
this is not easily solved