* Better and more secure argument parsing, and code reformatting
* Changes to resolve PR conversation
* Formatted via clang-format, fixed typos
* More typos
The previous code could run into issues into the following circumstances:
* The focused monitor is on its rightmost workspace with ID `i`.
* Another monitor has a workspace with ID `i+1`.
* `workspace_swipe_create_new` is enabled.
Then, swiping rightwards attempts to target a new workspace with ID
`i+1`: completing the swipe gesture unintentionally focuses that
workspace on whichever monitor it's already on while leaving the active
monitor in a broken state where it shows no windows but creates new
windows on the workspace it was previously on; and cancelling the swipe
gesture shifts the entire workspace `i+1` to the right by the width of
the active monitor.
By choosing an ID that doesn't exist, this problematic behavior is
avoided. More specifically, it's the smallest ID greater than any
existing workspace's ID, because otherwise the new workspace that was
seemingly just created to the right of the rightmost workspace could end
up somewhere in the middle of the workspace order.
* helpers: drop incomplete GNU/kFreeBSD bits
Debian with FreeBSD kernel lacks Wayland-related packages and is not
officially supported since Jessie.
* KeybindManager: check VT ioctl availability instead of hardcoding
* plugins: add missing header for libc++ after 430778293e
src/plugins/PluginAPI.cpp:299:33: error: implicit instantiation of undefined template 'std::basic_istringstream<char>'
std::istringstream inStream(SYMBOLS);
^
/usr/include/c++/v1/iosfwd:140:32: note: template is declared here
class _LIBCPP_TEMPLATE_VIS basic_istringstream;
^
* plugins: prefer llvm-nm with Clang after 430778293e
nm: invalid option -- j