aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
AgeCommit message (Collapse)Author
2018-10-19Merge pull request #2875 from RedSoxFan/input-device-bindingsDrew DeVault
cmd_bind{sym,code}: Implement per-device bindings
2018-10-19Consider cursor warp when switching workspacesRyan Dwyer
Fixes a regression introduced in 24a90e5d86441fc345356eb3767e5a6880dcedbd. consider_warp_to_focus has been renamed to seat_consider_warp_to_focus, moved to seat.c and made public. It is now called when switching workspaces via `workspace <ws>`.
2018-10-18cmd_bind{sym,code}: Implement per-device bindingsBrian Ashworth
bindsym --input-device=<identifier> ... bindcode --input-device=<identifier> ...
2018-10-18Remove cursor warping from seat_set_focusRyan Dwyer
Because cursor warping was the default behaviour in seat_set_focus, there may be cases where we may have been warping the cursor unintentionally. This patch removes cursor warping from seat_set_focus and only does it in the focus command. This is managed by a static function in focus.c. To know whether to warp or not, we need to know which node had focus previously. To keep track of this easily, seat->prev_focus has been introduced and is set to the previous in seat_set_focus.
2018-10-17Merge pull request #2858 from RyanDwyer/fix-move-to-floating-wsDrew DeVault
Fix moving tiled containers to workspaces which only have floating views
2018-10-17Fix crashes when running certain commands on an empty workspaceRyan Dwyer
This fixes crashes when running the border, mark, unmark and title_format commands on an empty workspace.
2018-10-17Fix moving tiled containers to workspaces which only have floating viewsRyan Dwyer
* Make a workspace which only contains floating views * Switch to another workspace and create a tiled view * Move the tiled view to the workspace with `move container to workspace N` The container would be added as a sibling to the floating view, which makes the container floating while having the geometry of a tiled container. This changes it so it only looks for tiled containers in the workspace with a fallback to the workspace itself.
2018-10-16Fix crash when using workspace back_and_forth with no previousRyan Dwyer
2018-10-16Merge branch 'master' into set-set-raw-focusIan Fan
2018-10-16Prevent duplicate workspace::focus eventsRyan Dwyer
Previously we would compare the last focus's workspace with the new focus's workspace to determine if we need to emit an IPC workspace::focus event. This doesn't work when moving the focused container to a new workspace. This adds a workspace property to the seat which stores the last emitted workspace::focus workspace. Using this method, after moving the container, refocusing it will trigger exactly one workspace::focus event: from the old workspace to the new workspace.
2018-10-15Introduce seat_set_raw_focus and remove notify argument from seat_set_focus_warpRyan Dwyer
This introduces seat_set_raw_focus: a function that manipulates the focus stack without doing any other behaviour whatsoever. There are a few places where this is useful, such as where we set focus_inactive followed by another call to set the real focus again. With this change, the notify argument to seat_set_focus_warp is also removed as these cases now use the raw function instead. A bonus of this is we are no longer emitting window::focus IPC events when setting focus_inactive, nor are we sending focus/unfocus events to the surface. This also fixes the following: * When running `move workspace to output <name>` and moving the last workspace from the source output, the workspace::focus IPC event is no longer emitted for the newly created workspace. * When splitting the currently focused container, unfocus/focus events will not be sent to the surface when giving focus_inactive to the newly created parent, and window::focus events will not be emitted.
2018-10-15Fix crash in swap commandRyan Dwyer
When swapping containers that are in the root of the workspace, parent will be NULL.
2018-10-14Document `border csd`Drew DeVault
2018-10-14commands: fix sending bar mode/hidden_state updates to all barsIan Fan
Previously, if a change was sent to all bars, it would only actually change the first bar it encountered, due to return value handling
2018-10-14Merge pull request #2808 from RedSoxFan/bar-subcommandsDrew DeVault
Fix bar subcommand handler structs and selection
2018-10-13cmd_bar: simplify logicBrian Ashworth
2018-10-13cmd_bar: fix bar id issuesBrian Ashworth
Allows bar-subcommand to be a valid bar-ids Destroys runtime created bar if trying to use a config only subcommand Allow subcommands (except for id) to be ids
2018-10-13fix_edge_gaps: Allow negative values for outer gaps.Tarmack
While allowing negative values for the outer gaps it is still prevented that negative values move windows out of the container. This replaces the non-i3 option for edge_gaps.
2018-10-13bar_cmd_status_command: only reload current barBrian Ashworth
Ideally, this will be replaced with an IPC barconfig_update event in the near future
2018-10-13Fix bar subcommand handler structs and selectionBrian Ashworth
2018-10-11fix: cmd_sticky crash sway with empty containermeak
2018-10-10Merge branch 'master' into bar-bindsymIan Fan
2018-10-10Add mouse_warping containerRouven Czerwinski
This option always moves the cursor into the middle of the container if the warp variable is true in seat_set_focus_warp. Fixes #2577
2018-10-09resize: Determine if anything changed using before/after checkRyan Dwyer
Returning a boolean from container_resize_tiled and resize_tiled doesn't work in all cases. This patch changes it back to void and does a before/after check to see if the container was resized.
2018-10-09bar-bindsym: address ianyfan's commentsBrian Ashworth
2018-10-09Implement bar bindsymBrian Ashworth
2018-10-08Merge branch 'master' into popup-during-fullscreenBrian Ashworth
2018-10-08commands: when setting urgency, check container is not nullIan Fan
2018-10-08Allow swaynag to be disabledBrian Ashworth
2018-10-08Merge pull request #2793 from emersion/disable-swaybgemersion
Allow swaybg to be disabled
2018-10-08Fix memory leak in status_command handleremersion
2018-10-08Check if there is a current container before setting it's opacityJohn Axel Eriksson
2018-10-08Allow swaybg to be disabledemersion
Same as #2791 but for swaybg. Fixes #2790
2018-10-08Implement popup_during_fullscreenRyan Dwyer
This introduces a new view_impl function: is_transient_for. Similar to container_has_ancestor but works using the surface parents rather than the tree. This patch modifies view_is_visible, container_at and so on to allow transient views to function normally when they're in front of a fullscreen view.
2018-10-08Allow status_command to be disabled via IPCRyan Dwyer
2018-10-08Don't apply seat config when validatingRyan Dwyer
2018-10-08Reload config using idle eventRyan Dwyer
This patch makes it so when you run reload, the actual reloading is deferred to the next time the event loop becomes idle. This avoids several use-after-frees and removes the workarounds we have to avoid them. When you run reload, we validate the config before creating the idle event. This is so the reload command will still return an error if there are validation errors. To allow this, load_main_config has been adjusted so it doesn't apply the config if validating is true rather than applying it unconditionally. This also fixes a memory leak in the reload command where if the config failed to load, the bar_ids list would not be freed.
2018-10-07Shim client.background and client.placeholderDrew DeVault
These are not supported by sway, but are valid i3 commands and should not cause config errors. Also includes a couple of minor touch-ups.
2018-10-03Add configuration for raising containers on focusJonathan Buch
* New configuration option: raise_floating (From the discussion on https://github.com/i3/i3/issues/2990) * By default, it still raises the window on focus, otherwise it will raise the window on click.
2018-10-03Fix some missing commands in sway-input(5)Drew DeVault
2018-10-03Merge pull request #2703 from RyanDwyer/csd-borderDrew DeVault
Add CSD to border modes
2018-10-01Handle border options for gapsBrian Ashworth
Fixes `hide_edge_borders smart` when gaps are in use. Implements `hide_edge_borders smart_no_gaps` and `smart_borders on|no_gaps|off`. Since `smart_borders on` is equivalent to `hide_edge_borders smart` and `smart_borders no_gaps` is equivalent to `hide_edge_borders smart_no_gaps`, I opted to just save the last value set for `hide_edge_borders` and restore that on `smart_borders off`. This simplifies the conditions for setting the border.
2018-09-30Merge pull request #2726 from RyanDwyer/overhaul-gapsDrew DeVault
Make gaps implementation consistent with i3-gaps
2018-09-30Merge pull request #2725 from PumbaPe/add-tap-and-dragDrew DeVault
Add tap and drag to sway-input
2018-09-29add tap-and-drag setting to sway-inputPP
2018-09-29Merge pull request #2729 from RyanDwyer/resize-return-falseemersion
Return an error when resizing is a no op
2018-09-29Return an error when resizing is a no opRyan Dwyer
2018-09-28Handle shell special characters in bg file pathBrian Ashworth
This changes it back so the path given to swaybg is enclosed in quotes. Additionally, the only character that is escaped in the path stored is double quotes now. This makes it so we don't need to keep an exhaustive list of characters that need to be escaped. The end user will still need to escape these characters in their config or when passed to swaybg.
2018-09-29Don't allow negative gapsRyan Dwyer
2018-09-29Make gaps implementation consistent with i3-gapsRyan Dwyer
This changes our gaps implementation to behave like i3-gaps. Our previous implementation allowed you to set gaps on a per container basis. This isn't supported by i3-gaps and doesn't seem to have a practical use case. The gaps_outer and gaps_inner properties on containers are now removed as they just read the gaps_inner from the workspace. `gaps inner|outer <px>` no longer changes the gaps for all workspaces. It only sets defaults for new workspaces. `gaps inner|outer current|workspace|all set|plus|minus <px>` is now runtime only, and the workspace option is now removed. `current` now sets gaps for the current workspace as opposed to the current container. `workspace <ws> gaps inner|outer <px>` is now implemented. This sets defaults for a workspace. This also fixes a bug where changing the layout of a split container from linear to tabbed would cause gaps to not be applied to it until you switch to another workspace and back.