commands: accept 'next'/'prev' output names - #9128
Open
orestisfl wants to merge 1 commit into
Open
Conversation
`move container to output`, `move workspace to output` and `focus output` now accept 'next' and 'prev', which cycle through the enabled outputs with wrap-around. This matches i3's behaviour of expanding 'next' into the full output list so the following output relative to the current one is picked. The name/direction/current resolution used by the move commands was also duplicated inline in `focus_output`; both call sites now share a new `output_by_direction_or_name` helper in `sway/desktop/output.c`. Closes: swaywm#8799 i3 implementation in i3/i3#4338 Note: - i3 accepts multiple output arguments and `next` works as a wildcard. I considered that out of scope for this PR. - i3 does not have `prev`. Accepting it in sway is natural and practically free complexity-wise so I added it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
move container to output,move workspace to outputandfocus outputnow accept 'next' and 'prev', which cycle through the enabled outputs with wrap-around. This matches i3's behaviour of expanding 'next' into the full output list so the following output relative to the current one is picked.The name/direction/current resolution used by the move commands was also duplicated inline in
focus_output; both call sites now share a newoutput_by_direction_or_namehelper insway/desktop/output.c.Closes: #8799
i3 implementation in i3/i3#4338 Note:
nextworks as a wildcard. I considered that out of scope for this PR.prev. Accepting it in sway is natural and practically free complexity-wise so I added it.