Skip to content

Conversation

@penguin42
Copy link

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

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 <[email protected]>
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 <[email protected]>
Convert to use previously added helper.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Add a helper to find the monitor size for a given window.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
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 <[email protected]>
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 <[email protected]>
1% is a lot of pixels on a uHD display; allow fractional percentages.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant