aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands
Commit message (Collapse)AuthorAge
* cmd_move: update container representation in sibling swapsLibravatar Ronan Pigott2021-01-04
|
* commands/move: reset geometry of promoted containersLibravatar Ronan Pigott2020-12-20
|
* commands/move: squash workspace after directional con moveLibravatar Ronan Pigott2020-12-20
|
* commands/move: rework container_move_in_directionLibravatar Ronan Pigott2020-12-20
| | | | | | | | | | This changes the move command to better match i3 behavior after the layout changes. workspace_rejigger handled the case where containers would escape their workspace in an orthogonal move by changing the layout to accomodate them, but this case is now handled within the loop.
* Revert "commands/move: maintain workspace_layout when moving"Libravatar Ronan Pigott2020-12-20
| | | | | | | This is in preparation for changing the workspace_layout command to work like it does in i3. This reverts commit b4a75a1ab2a72842830aeea37733311f85e6f660.
* commands/move: don't flatten on move; reap empty former parent insteadLibravatar Tudor Brindus2020-12-20
| | | | | | | | | | | | | | | | | | Some comparisons of current Sway versus i3 behavior: 1) T[T[T[app]]] + move left * Sway: T[app] * i3: T[T[app]] 2) H[V[H[V[app]]]] + move left * Sway: H[app] * i3: H[V[app]] After this commit, Sway behavior matches i3. The intermediate states are now: T[T[T[app]]] -> T[T[app T[]]] -> T[T[app]] H[V[H[V[app]]]] -> H[V[app H[V[]]]] -> H[V[app]]
* commands/layout: don't change the layout of workspaces with childrenLibravatar Ronan Pigott2020-12-20
| | | | | | In i3 the layout command on a workspace affects the workspace layout only on empty workspaces. Otherwise children are placed in a new container with the desired layout to preserve the workspace layout.
* container: don't split single childrenLibravatar Ronan Pigott2020-12-20
| | | | | | In i3 splits are ineffective on singleton H/V containers, and the command is interpreted to affect the parent layout instead.
* input/cursor: unhide cursor on synthetic inputLibravatar Tudor Brindus2020-12-06
| | | | Fixes #5847.
* tree/container: introduce `container_is_sticky[_or_child]` functionsLibravatar Tudor Brindus2020-11-11
| | | | | | | | | | To query whether a container is sticky, checking `con->is_sticky` is insufficient. `container_is_floating_or_child` must also return true; this led to a lot of repetition. This commit introduces `container_is_sticky[_or_child]` functions, and switches all stickiness checks to use them. (Including ones where the container is already known to be floating, for consistency.)
* commands/focus: force container warp when fulfilling `focus mode_toggle`Libravatar Tudor Brindus2020-11-01
| | | | | | | This commit switches focusing behavior to force a warp when executing `focus mode_toggle`. Fixes #5772.
* hide_cursor: Add an option to hide when typingLibravatar Tamir Zahavi-Brunner2020-10-30
| | | | | Add an option for the `hide_cursor` command to hide the cursor when typing, i.e. whenever a key is pressed.
* commands/move: fix crash when moving sphsc childLibravatar Ronan Pigott2020-10-24
|
* commands/resize: don't consider 1px resizes to be invalidLibravatar Daniel De Graaf2020-10-22
| | | | | | A "resize shrink width 1px" will cause grow_x to be 0 while grow_width is -1, incorrectly rejecting the command even though the resize is not a noop. Fix this by checking width/height instead of x/y.
* input/tablet: add tool_mode option to set tablet tools as relative inputLibravatar Tudor Brindus2020-10-12
| | | | Closes #4139.
* Add support for workspace_min_width bar option.Libravatar Tarmack2020-10-11
|
* commands/move: fix single-split escaping on moveLibravatar Tudor Brindus2020-10-04
| | | | | | | | | Prior to this commit, having a layout like T[app1 V[app2]], focusing app2, and then doing `move left` would result in T[app2 app1]. Now, the resulting layout is T[app1 app2], which matches i3 behavior. `container_flatten` updates `container->parent`, meaning that the existing check would never be true.
* exec: fix validation during config reloadLibravatar Konstantin Pospelov2020-08-24
| | | | | Split cmd_exec_always into separate methods for general validation and process creation. This fixes a potential call of join_args with 0 arguments.
* fix force_display_urgency_hint parsingLibravatar Rex Hackbro2020-08-03
|
* Fix incorrect format specifiersLibravatar Antonin Décimo2020-07-30
|
* cmd/bar/colors: fix dereference of null pointerLibravatar Antonin Décimo2020-07-30
| | | | | | `!*rgba` tests if the first byte of rgba isn't `'\0'`. `hex_to_rgba_hex` returns NULL if `parse_color` fails. There's a null pointer dereference in that case. The intended behavior is `!rgba`.
* Use wlr_output_layout_output_at to get output for move to cursorLibravatar Thayne McCombs2020-07-27
|
* Keep windows in bounds on move to position mouseLibravatar Thayne McCombs2020-07-27
| | | | | | | | | | | | | If the mouse/cursor/pointer is near the edge of an output when a "move position to pointer" command is run, then the floating container will be constrained to fit inside the bounds of the output as much as possible. This behavior matches what i3 does in this scenario. I also think it is a better user experience. Relates to #4906 The logic for the bounds check follows the implementation in i3: https://github.com/i3/i3/blob/733077822302d8b77eacb606a26fd002a42f534f/src/floating.c#L536
* added ppt unit to move position commandLibravatar Nils Schulte2020-07-21
|
* moved and renamed movement-unit parsing to commonLibravatar Nils Schulte2020-07-21
|
* Reload command now matches i3's implementationLibravatar Geoffrey Casper2020-07-07
|
* commands/move: maintain workspace_layout when movingLibravatar Tudor Brindus2020-07-03
| | | | Fixes #5157.
* commands/move: unwrap workspace container on move to new workspaceLibravatar Tudor Brindus2020-07-01
| | | | | | | | | If moving e.g. `T[app app]` into a new workspace with `workspace_layout tabbed`, then post-move the tree in that workspace will be `T[T[app app]]`. This still happens with horizontal or vertical workspace layout, but is less visible since those containers have no decorations. Fixes #5426.
* input_cmd_click_method: fix typo in error textLibravatar Tudor Brindus2020-06-19
|
* seat_cmd_cursor: emit frame eventsLibravatar Brian Ashworth2020-05-29
| | | | | | | This emits frame events for the seat_cmd_cursor subcommands. The wl_pointer frame event are required to notify clients when to process the events. It will now be emitted after cursor movement, button press, button release, and axis events.
* commands: Add per-view shortcuts_inhibitor commandLibravatar Michael Weiser2020-05-13
| | | | | | | | | | | | | | | | | | | | | Add a separate per-view shortcuts_inhibitor command that can be used with criteria to override the per-seat defaults. This allows to e.g. disable shortcuts inhibiting globally but enable it for specific, known-good virtualization and remote desktop software or, alternatively, to blacklist that one slightly broken piece of software that just doesn't seem to get it right but insists on trying. Add a flag to sway_view and handling logic in the input manager that respects that flag if configured but falls back to per-seat config otherwise. Add the actual command but with just enable and disable subcommands since there's no value in duplicating the per-seat activate/deactivate/toggle logic here. Split the inhibitor retrieval helper in two so we can use the backend half in the command to retrieve inhibitors for a specific surface and not just the currently focused one. Extend the manual page with documentation of the command and references to its per-seat sibling and usefulness with criteria. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* Restrict relative output transforms to runtime changesLibravatar Simon Ser2020-04-21
| | | | | | | | Prevent them from being used in the config file. This is a breaking config file change. References: https://github.com/swaywm/sway/issues/5236
* Fix a use-after-free error in switch bindingLibravatar Di Ma2020-04-14
|
* Fix a use-after-free error in switch bindingLibravatar Di Ma2020-04-14
|
* Implement create_output command for headless backendLibravatar Simon Ser2020-04-14
|
* add --no-repeat option for bindingsLibravatar Linus Heckemann2020-03-30
| | | | | | | | | This allows e.g. triggering one command while a key is held, then triggering another to undo the change performed by it afterwards. One use case for this is triggering push-to-talk functionality for VoIP tools without granting them full access to all input events. Fixes #3151
* check for workspace command name argLibravatar r-c-f2020-03-24
| | | | | | | | | | | | | | | | | | * check for workspace command name arg (fix #5131) For the 'workspace <name> output <output>' command, output_location must be greater than zero or the attempt to get the workspace name with join_args will segfault or abort() (depending on the flavor of sway_assert() in use). This checks and returns an error instead. * put workspace output error string on one line To ease grepping as requested * check for name in workspace gaps command as well A malformed command here will lead to the same result seen in #5131, so add a check. Done inside the cmd_workspace_gaps() function itself, to take advantage of the existing 'Expected...' string.
* commands/bind.c: remove unnecessary checkLibravatar Jason Nader2020-03-15
|
* commands: Adjust style in cursors commandLibravatar Michael Weiser2020-03-11
| | | | | | | Remove some unnecessary brackets in an error condition check identified during review of the shortcuts inhibitor command code (#5021). Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* commands: Add shortcuts_inhibitor commandLibravatar Michael Weiser2020-03-11
| | | | | | | | | | | | | | | | | | | Add a command to influence keyboard shortcuts inhibitors. In its current form it can be used to activate, deactivate or toggle an existing inhibitor on the surface currently receiving input. This can be used to define an escape shortcut such as: bindsym --inhibited $mod+Escape seat - shortcuts_inhibitor deactivate It also allows the user to configure a per-seat default of whether keyboard inhibitors are honoured by default (the default) or not. Using the activate/toggle command they can then enable the lingering inhibitor at a later time of their choosing. As a side effect this allows to specifically address a named seat for actions as well, whatever use-case that might serve. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* input: Add support for keyboard shortcuts inhibitLibravatar Michael Weiser2020-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adding support for the keyboard shortcuts inhibit protocol allows remote desktop and virtualisation software to receive all keyboard input in order to pass it through to their clients so users can fully interact the their remote/virtual session. The software usually provides its own key combination to release its "grab" to all keyboard input. The inhibitor can be deactivated by the user by removing focus from the surface using another input device such as the pointer. Use support for the procotol in wlroots to add support to sway. Extend the input manager with handlers for inhibitor creation and destruction and appropriate bookkeeping. Attach the inhibitors to the seats they apply to to avoid having to search the list of all currently existing inhibitors on every keystroke and passing the inhibitor manager around. Add a helper function to retrieve the inhibitor applying to the currently focused surface of a seat, if one exists. Extend bindsym with a flag for bindings that should be processed even if an inhibitor is active. Conversely this disables all normal shortcuts if an inhibitor is found for the currently focused surface in keyboard::handle_key_event() since they don't have that flag set. Use above helper function to determine if an inhibitor exists for the surface that would eventually receive input. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* input: implement cycling through keyboard layout listLibravatar Bor Grošelj Simić2020-03-11
|
* Add an adaptive_sync output commandLibravatar Simon Ser2020-03-07
| | | | | | | | | This enables/disables adaptive synchronization on the output. For now, the default is disabled because it might cause flickering on some hardware if clients don't submit frames at regular enough intervals. In the future an "auto" option will only enable adaptive sync if a fullscreen client opts-in via a Wayland protocol.
* treewide: fix typosLibravatar Torstein Husebø2020-02-18
|
* input_cmd_events: add support for input typesLibravatar Brian Ashworth2020-02-18
| | | | | | | | | | | This adds support for input type configs to input_cmd_events. This works similar to the wildcard handling that existed where configs for the devices are stored and the type config is reset to INT_MIN so that it does not override. This also condenses the toggle_send_events and toggle_wildcard_send_events functions into a single function to reduce code duplication.
* Fix output transform rotation directionLibravatar Simon Ser2020-02-17
| | | | | | | | This patch makes it so users that have configured their screen with a transform don't have to update their config after the wlroots breaking change. References: https://github.com/swaywm/wlroots/pull/2023
* Fix output transform anticlockwiseLibravatar Simon Ser2020-02-17
| | | | This wouldn't have any effect if the transform was flipped.
* cmd_swap: fix test_mark conditionLibravatar Brian Ashworth2020-02-13
| | | | | | | The condition in test_mark was checking the negation of list_seq_find. This works fine for the first mark, but fails for every other mark. This fixes the condition to check for anything other than -1, which is the value returned from list_seq_find for index not found.
* config: fix validation exit code and log levelLibravatar Brian Ashworth2020-02-11
| | | | | | | | | This makes it so invalid configs will return the exit code 1 when the validation flag is given. This also reduces the log level to SWAY_ERROR, which makes it so only the errors are shown. If someone wants more verbose output, the can use the -V/--verbose or -d/--debug flags. Additionally, this also makes it so swaybg will not be spawned when validating the config.
* Add ability to remove the floating modifierLibravatar Alex Maese2020-01-20
|