`swaymsg -t get_inputs --raw` calls it a pointer but `--pretty` calls it
a Mouse. Previous commit 6737b90cb that set this to pointer probably
forgo to update the pretty one.
closes#8584
The JSON field is named "active", but that's confusing for users:
`output disable` is the command which results in `active = false`
outputs. Use the same terminology in end-user messages.
The fractional part of the real number we want to represent never has
more than 3 decimal digits, so use 3 decimal digits of precision.
e.g. 'swaymsg -t get_outputs' would show a refresh rate of 59934 mHz
as 59.933998 Hz, now correctly as 59.934 Hz.
This adds a tip to the command section about using two hyphens before a
command to signal that no swaymsg options will follow to allow for sway
commands with leading hyphens.
This adds a 3 second timeout to the initial reply in swaymsg. This
prevents swaymsg from hanging when `swaymsg -t get_{inputs,seats}` is
used in i3. The timeout is removed when waiting for a subscribed event
or monitoring for subscribed events.
This also adds type checks to commands where i3 does not reply with all
of the properties that sway does (such as `modes` in `get_outputs`).
This is mostly just a behavioral adjustment since swaymsg should run on
i3. When running under i3, some command reply's (such as the one for
`get_outputs) may have more useful information in the raw json than the
pretty printed version.
Use libinput_device_config_tap_get_finger_count to determine whether
a pointer is a touchpad.
swaymsg is also updated to reflect the new touchpad type.
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.
Addresses https://github.com/swaywm/sway/issues/3163
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>