aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-json.c
Commit message (Collapse)AuthorAge
* container: Move pending state to state structLibravatar Kenny Levinsen2021-02-16
| | | | | | | | | Pending state is currently inlined directly in the container struct, while the current state is in a state struct. A side-effect of this is that it is not immediately obvious that pending double-buffered state is accessed, nor is it obvious what state is double-buffered. Instead, use the state struct for both current and pending.
* Align ordering of core node properties with i3Libravatar Jan Palus2021-02-15
| | | | | | | | | | Try to better mimic JSON node structure produced by i3 which might be relied on by already existing tools. In particular having "type" right after "id" is quite handy for streaming high-performance JSON parsers such as simdjson (which are handy for maintaining responsiveness on resource constrained systems). refer https://github.com/i3/i3/blob/ab2a22a78b25ad12fed2c177a34c44950795cf33/src/ipc.c#L338
* Add support for workspace_min_width bar option.Libravatar Tarmack2020-10-11
|
* Fix incorrect format specifiersLibravatar Antonin Décimo2020-07-30
|
* i3-compat: add GET_BINDING_STATE IPC commandLibravatar Jason Nader2020-06-14
|
* Add views idle inhibition status in get_tree outputLibravatar Damien Tardy-Panis2020-05-29
| | | | Fixes #5286
* ipc: invert output transformation when necessaryLibravatar Tudor Brindus2020-05-28
| | | | | | | | After swaywm/wlroots#2023, #4996 inverted configuration transformations. For consistency, we should undo (double-apply) the inversion when communicating via IPC. Closes #5356.
* ipc: show marks of containers without view in treeLibravatar lbonn2020-05-22
|
* Add each view's shell to JSON descriptionLibravatar Thomas Hebb2020-04-27
| | | | | | | This is a criteria you can use to select windows since commit 484cc189e909 ("Add shell criteria token"), but there's no way to query it for an existing window. This exposes its value in the output of `swaymsg -t get_tree`.
* Limit workspace numbers within 0..INT32_MAXLibravatar Jason Nader2020-03-12
| | | | See https://github.com/i3/i3/commit/83c7aff089a6728b6e522d934d656a8e09463112
* ipc: add missing required propertiesLibravatar Ian Fan2020-03-10
|
* Add adaptive_sync_status to output IPC replyLibravatar Simon Ser2020-03-07
|
* i3compat: add `window_type` to IPC responseLibravatar Jason Nader2020-02-17
| | | | i3 added these in i3/i3#3797
* i3compat: add `window_type` to IPC responseLibravatar Jason Nader2020-02-17
| | | | i3 added these in i3/i3#3797
* ipc-json: Remove unnecessary dereferenceLibravatar Ronan Pigott2020-01-16
|
* add scale_filter output config optionLibravatar Ronan Pigott2019-11-29
|
* Add max_render_time to view JSONLibravatar Ivan Molodetskikh2019-11-17
|
* Add max_render_time to output JSONLibravatar Ivan Molodetskikh2019-11-17
|
* calibration_matrix: add the current matrix to the IPC description for ↵Libravatar Sergei Dolgov2019-07-05
| | | | libinput devices
* ipc: add xkb_layout_names and xkb_active_layout_indexLibravatar Simon Ser2019-06-09
| | | | | | These can be useful to implement per-window layouts as a script. See https://github.com/swaywm/sway/issues/2361
* Provide current DPMS state in GET_OUTPUTSLibravatar Josef Gajdusek2019-05-28
|
* Send disabled output available modes on IPC get_outputsLibravatar Ranieri Althoff2019-04-16
| | | | | | - Also fix missing trailing newline on pretty print Signed-off-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
* Add heuristics to differentiate touchpadsLibravatar Benjamin Cheng2019-04-14
| | | | | | | 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.
* Support WLR_INPUT_DEVICE_SWITCH in swayLibravatar Ryan Walklin2019-03-19
| | | | | | | | | | | | | | | | | | | | | This commit adds support for laptop lid and tablet mode switches as provided by evdev/libinput and handled by wlroots. Adds a new bindswitch command with syntax: bindswitch <switch>:<state> <command> Where <switch> is one of: tablet for WLR_SWITCH_TYPE_TABLET_MODE lid for WLR_SWITCH_TYPE_LID <state> is one of: on for WLR_SWITCH_STATE_ON off for WLR_SWITCH_STATE_OFF toggle for WLR_SWITCH_STATE_TOGGLE (Note that WLR_SWITCH_STATE_TOGGLE doesn't map to libinput and will trigger at both on and off events)
* get_deco_rect: fix floaters on tabbed/stacked wsLibravatar Brian Ashworth2019-03-11
| | | | | | | | | | | This fixes the decoration rects for floating containers on a workspace that is either tabbed or stacked. Without this, the floater would incorrectly try to calculate where it's tab or stack decorations were on the workspace. This would cause a SIGFPE (due to a divide-by-zero) when the floater was on a tabbed workspace without any tiling children. Furthermore, the floater does not care what the workspace's layout is and should just use the location relative to the workspace. This should have no effect on children of a floating container.
* Fix crash when moving window to scratchpadLibravatar minus2019-03-09
|
* ipc: describe libinput device configurationLibravatar Brian Ashworth2019-03-07
| | | | | | | | 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.
* ipc: fix fullscreen deco_rectLibravatar Brian Ashworth2019-03-06
| | | | | | This fixes the deco_rect reported by the ipc for fullscreen containers to be all zeroes. Children of the fullscreen container should still have their decorations reported correctly
* ipc: fix rect for stacked childrenLibravatar Brian Ashworth2019-03-06
| | | | | This now takes all titlebars for stacked children into account for the ipc property `rect`
* ipc: change {,deco_}rect to match i3Libravatar Brian Ashworth2019-03-06
| | | | | | | | | | | | This fixes the `deco_rect` and `rect` properties in the IPC responses to match i3's behavior. `deco_rect` should be relative to the parent node, not the current node. This also takes tabbed and stacked decorations into account and will calculate `deco_rect` for all containers since tabbed and stacked child containers will have decorations. `rect` should exclude the window decorations.
* ipc: add missing fields to disabled outputsLibravatar Caleb Bassi2019-02-23
| | | | | | i3 requires all outputs to have certain fields, including 'primary', 'current_workspace', and 'rect' which were missing on disabled outputs. https://i3wm.org/docs/ipc.html#_outputs_reply
* Handle NULL from output_get_active_workspaceLibravatar Brian Ashworth2019-02-21
| | | | | | | | | | This modifies the places where output_get_active_workspace is called to handle a NULL result. Some places already handled it and did not need a change, some just have guard off code blocks, others return errors, and some have sway_asserts since the case should never happen. A lot of this is probably just safety precautions since they probably will never be called when `output_get_active_workspace` is not fully configured with a workspace.
* Add 'visible' key to view json responseLibravatar Yorick van Pelt2019-02-18
|
* ipc: handle unnamed xkb_active_layout_nameLibravatar Brian Ashworth2019-02-11
| | | | | | 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)`.
* Introduce container_is_scratchpad_hiddenLibravatar Ryan Dwyer2019-01-28
| | | | | | | | | | | | Just a convenience function that improves readability of the code. Other things worth noting: * container_get_siblings and container_sibling_index no longer use the const keyword * container_handle_fullscreen_reparent is only ever called after attaching the container to a workspace, so its con->workspace check has been changed to an assertion
* Implement fullscreen globalLibravatar Ryan Dwyer2019-01-25
|
* Make json-c include respect pkg-config --cflagsLibravatar Jan Beich2019-01-23
| | | | | 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.
* bar_cmd_tray_bind: Use mouse button helpersLibravatar Brian Ashworth2019-01-16
| | | | | | | | | | | | | | | | This modifies `bar_cmd_tray_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `bar_cmd_tray_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like with sway bindings, the two commands are encapsulated in a single file to maximize shared code. This also modifies tray bindings to work off of events codes rather than x11 buttons, which allows for any mouse buttons to be used. For `get_bar_config`, `event_code` has been added to the `tray_bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`.
* Merge pull request #3344 from RedSoxFan/bar-mouse-bindings-improvedLibravatar Drew DeVault2019-01-13
|\ | | | | Improve mouse button parsing: bar mouse bindings
| * bar_cmd_bind: utilize mouse button helpersLibravatar Brian Ashworth2019-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies `bar_cmd_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `cmd_bar_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like sway bindings, the two commands are encapsulated in a single file with shared code. This also modifies swaybar to operate off of event codes rather than x11 button numbers, which allows for any mouse button to be used. This introduces two new IPC properties: - For `get_bar_config`, `event_code` has been added to the `bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`. - Likewise for `click_events`, `event` has been added and will include the event code for the button clicked. If the event code can be mapped to a x11 button, `button` will still be the x11 button number. Otherwise, `button` will be `0`.
* | Merge pull request #3398 from RedSoxFan/toggle-input-eventsLibravatar Drew DeVault2019-01-13
|\ \ | | | | | | input events: toggle and ipc get_inputs
| * | get_inputs: add libinput send events modeLibravatar Brian Ashworth2019-01-09
| |/ | | | | | | | | Add `libinput_send_events` to the IPC output for `get_inputs` to allow scripting of mode changes.
* | swaybar: add status_edge_padding commandLibravatar Brian Ashworth2019-01-11
| | | | | | | | | | This adds the bar subcommand `status_edge_padding <padding>` to set the padding used when the status line is on the right edge of the bar.
* | swaybar: add status_padding commandLibravatar Brian Ashworth2019-01-11
|/ | | | | | Adds the bar subcommand `status_padding <padding>` which allows setting the padding used for swaybar. If `status_padding` is set to `0`, blocks will be able to take up the full height of the bar.
* swaybar: implement tray configLibravatar Ian Fan2018-12-31
|
* added fullscreen_mode to get_tree outputLibravatar NokiDev2018-12-25
| | | | Signed-off-by: NokiDev <noki.dev@gmail.com>
* Update for swaywm/wlroots#1377Libravatar Rostislav Pehlivanov2018-12-16
| | | | -Werror is eͫ̐ͭ҉vi͆ͦ̏ͦlͥ̀͒̊͂͛
* Implement bar gapsLibravatar Brian Ashworth2018-11-28
| | | | | | | | | Adds the bar subcommand `gaps <amount>|<horizontal> <vertical>|<top> <right> <bottom> <left>` to set gaps for swaybar. Due to restrictions on margins for a layer_surface, only the sides that are anchored to an edge of the screen can have gaps. Since there is support for per-side outer gaps for workspaces, those should be able to be used instead for the last side.
* IPC: Use consistent function names across ipc-jsonLibravatar Mihai Coman2018-11-26
|
* IPC: Add scratchpad containers to get_tree replyLibravatar Mihai Coman2018-11-26
| | | | | This patch lists all hidden scratchpad containers as floating nodes on "__i3_scratch" workspace. This workspace resides on "__i3" output.