Open
Conversation
Add a helper - xdo_get_xy - that parses positions and sizes
that can include percentages.
It currently handles:
simple numbers: 200
percentages: 50% (of root window size)
unchanged: x or y
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Convert to use previously added helper. Gains the ability to keep some dimensions the same using 'x' or 'y' instead of a number. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Convert to use previously added helper. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Add a helper to find the monitor size for a given window. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Allow percentages to be specified as a size of the monitor that the window is currently on, i.e. we can now do: 100 (pixels) 100% (the whole root window width) 100%m (the whole of the monitor the window is on) Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Allow windowmove to use monitor relative percentage; e.g. windowmove 50%m 50%m to put a window whose top left is in the centre of the monitor it's currently on. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
1% is a lot of pixels on a uHD display; allow fractional percentages. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
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.
This reworks the % options in windowsize and windowmove, to allow:
30%m to specify 30% of the current monitor
x (or y) to mean don't change (used to only work in windowmove)
33.33%m fractional percentages