aboutsummaryrefslogtreecommitdiff
path: root/swaymsg
AgeCommit message (Collapse)Author
2021-01-16Changed fprintf(stdout,...) to printf(...) for more readable codeSpizzyCoder
2021-01-15swaymsg: use 3 digits for fractional part of the refresh rateRonan Pigott
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.
2020-09-04swaymsg.1: expand tip for multi-word strings.Érico Rolim
Strings with commas inside, such as the ones used for xkb_{config,layout} commands, count as multi-word strings.
2020-08-05swaymsg.1: correct typoMark Stosberg
2020-07-15Add note on quoting to swaymsg manpageCampbell Vertesi
2020-06-14i3-compat: add GET_BINDING_STATE IPC commandJason Nader
2020-03-07Add adaptive_sync_status to output IPC replySimon Ser
2019-11-29add scale_filter output config optionRonan Pigott
2019-11-17Add max_render_time to output JSONIvan Molodetskikh
2019-09-12swaymsg.1: fix typosMartin Michlmayr
2019-09-10swaymsg.1: fix description of --prettyMartin Michlmayr
2019-08-13swaymsg.1: add tip about two hyphens for commandsBrian Ashworth
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.
2019-08-06swaymsg: return 2 for sway errorsBrian Ashworth
This mirrors a change in i3 4.17 that returns 2 for errors from sway, including invalid command, command failed, and invalid subscription requests
2019-06-07Add the missing constant for the switch input typeAbdelhakim Qbaich
2019-05-03swaymsg: fix quiet error reportingBrian Ashworth
This makes it so swaymsg still returns the correct successful or failed error code when in quiet mode
2019-04-17swaymsg: add timeout and type checksBrian Ashworth
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.
2019-04-16Send disabled output available modes on IPC get_outputsRanieri Althoff
- Also fix missing trailing newline on pretty print Signed-off-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
2019-04-14Add heuristics to differentiate touchpadsBenjamin Cheng
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.
2019-03-24Add support for manually setting subpixel hinting on outputs.Geoff Greer
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
2019-03-16Flush stdout in swaymsg when in subscribe modeFlakebi
2019-03-08Add -p/--pretty option to swaymsgPeter Grayson
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-07ipc: describe libinput device configurationBrian Ashworth
This adds the device configurations to the ipc response for libinput devices. Only supported configuration options for the device will be added. This also moves `libinput_send_events` inside a new `libinput` object that contains the rest of the configuration options. sway-ipc(7) has been updated to reflect the changes and document the new additions.
2019-02-27Add sway-ipc.7.scd to document IPC protocolBrian Ashworth
This add `sway-ipc.7.scd` that documents the IPC protocol. This also increased the minimum scdoc version from 1.8.1 to 1.9.0 to allow for table cells to be continued on the following line
2019-02-11ipc: handle unnamed xkb_active_layout_nameBrian Ashworth
If the active xkb_layout does not have a name, use `NULL` instead of `json_object_new_string(NULL)`. This also makes it so swaymsg will pretty print this as `(unnamed)`.
2019-01-23Make json-c include respect pkg-config --cflagsJan Beich
json-c.pc contains `Cflags: -I${includedir}/json-c`, so `<json-c/json.h>` won't be found unless the parent directory is searched by default.
2019-01-21Removed unused wlroots dependency for sway(bg|bar|msg|nag)M Stoeckl
Also remove direct libm dependency where unused.
2019-01-21Replace wlr_log with sway_logM Stoeckl
This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
2019-01-18meson: remove rpath optionsemersion
2019-01-09get_inputs: add libinput send events modeBrian Ashworth
Add `libinput_send_events` to the IPC output for `get_inputs` to allow scripting of mode changes.
2019-01-01Remove readline.cIan Fan
All occurrences of read_line have been replaced by getline. peek_line has been absorbed into detect_brace.
2018-11-28swaymsg: parse success of single objectBrian Ashworth
Allows swaymsg to parse the success attribute of a single object response. This is needed for the subscribe event.
2018-11-28Implement support for swaymsg -t SUBSCRIBE [-m]Brian Ashworth
In `i3 4.16`, `i3-msg` can be used with the message type `subscribe` and has the ability to monitor for responses until killed. This adds support for both to swaymsg. If the JSON array of event types is malformed or contains an invalid event, sway will send a response with `success` set to `false`. If swaymsg sees this, it will not display the failure and exit. If the `subscribe` event is successful, swaymsg will wait for the first response and display that instead of the success message. If `-m/--monitor` is given, swaymsg will continue monitor for responses until killed or a malformed response is received. For the `subscribe` event, the responses will always be printed as JSON. If `-r/--raw` is given, the JSON will not be pretty printed, which may be preferred when monitoring due to there being multiple responses. Example: `swaymsg -t SUBSCRIBE -m "['window']"`
2018-11-25Replace _XOPEN_SOURCE with _POSIX_C_SOURCEemersion
And make sure we don't define both in the same source file.
2018-11-12IPC: Send keyboard layout info in IPC_GET_INPUTSHarish Krupo
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
2018-11-04document swaymessage type for get_seatsmadblobfish
2018-11-03ipc: move refresh from output to output->current_modeCole Mickens
2018-11-03swaymsg: get_outputs: use output->current_mode for current mode displayCole Mickens
2018-10-29swaymsg: fix get_outputs status codeemersion
2018-10-10Fix program name in version stringsRyan Dwyer
When running swaymsg -v, the version returned is actually the version of swaymsg itself, yet the message displayed was "sway version <version>". This can create confusion if users update sway and swaymsg but don't restart sway, then use swaymsg to check the version. This patch changes the wording to be "swaymsg version <version>" instead, and likewise for swaybar. To get the version of a running sway instance, users should run swaymsg -t get_version.
2018-09-30Add support for installing binaries with DT_RPATHArkadiusz Hiler
It's better to use DT_RPATH dynamic section of the elf binary to store the paths of libraries to load instead of overwriting LD_LIBRARY_PATH for the whole environment, causing surprises. This solution is much more transparent and perfectly suitable for running contained installations of wayland/wlroots/sway. The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as it's a placebo security at best - we should trust the execution path that leads us to running sway, and it's way too late to care about those variables since we already started executing our compositor, thus we would be compromised anyway.
2018-08-01ipc: add tick eventIan Fan
2018-07-10Remove `clipboard` command and `get_clipboard` messageemersion
2018-07-10Add get_config message type to ipcIan Fan
2018-07-10Add get_binding_modes message type to ipcIan Fan
2018-07-09Update for swaywm/wlroots#1126emersion
2018-06-30refactor success_objectArmin Preiml
2018-06-30fix swaymsg: errors are displayed againArmin Preiml
Command errors didn't get displayed, because the success function didn't accept objects
2018-06-06Store sway_outputs so that they can be reenabledBrian Ashworth
2018-05-29Add tree representation to IPC workspace descriptionRyan Dwyer
2018-05-28swaymsg: Fix exit codeRyan Dwyer