Allow move position command to calculate from right and/or bottom edge#523
Open
gwhitney wants to merge 1 commit into
Open
Allow move position command to calculate from right and/or bottom edge#523gwhitney wants to merge 1 commit into
move position command to calculate from right and/or bottom edge#523gwhitney wants to merge 1 commit into
Conversation
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.
Unlike Xorg geometry specifications (e.g.
80x30-10-10) or CSS specifications (usingrightandbottomproperties), prior to this PR SwayFX has no way to specify a window position as an offset to the right edge or bottom edge of its containing workspace. However, it is convenient to have such a mechanism for positioning a window in, say, the bottom right corner of the screen.This PR adds optional
left/rightandtop/bottomkeywords before each dimension of themove position <dim> <dim>command. To preserve the behavior of existing config files/sway commands, omitted keywords on each dimension behave likeleftandtoprespectively.Note that partial credit for this PR should go to @cizra, who filed a similar PR with sway itself. If the sway team shows interest in the somewhat refined version as filed here, we will likely file a very similar or identical PR to sway.
I wasn't sure if there were any other steps in generating a PR besides the code and documentation changes in the one commit of this PR? I didn't see any test suite that I should add to. If there are other tasks, please just let me know. In any case, this change can be tested by issuing a variety of
swaymsgcommands, such as: