jwm
jwm copied to clipboard
Make the root menu location configurable
When using a key binding to show the root menu, JWM currently shows the root menu at the current mouse location. In the past, JWM placed the root menu in the upper-left corner of the screen. This could be made configurable by optional "x" and "y" coordinates on the RootMenu
tag.
This is definitely a nice feature!
I would have one question - namely how to achieve placement of the menu exactly at e.g. 30% of the display height from top and 50% of the display width from left? I know we can compute anything using the <Include>
tag, but without knowing the width and height of the menu in advance, we can't compute it.
Any thoughts?
I was thinking that positive coordinates would set the upper-left corner of the menu to the specified position and negative coordinates would set the lower-right corner of the menu, just like trays. So you could do something like x=“100” y=“-20”
to have the right side of the menu set to 100 pixels from the left side of the screen and the bottom of the menu set to 20 pixels from the bottom of the screen.
A possible addition to this would be to make it possible to configure which point of the menu the coordinates control (upper-left, center, lower-right, etc.).
Adding support for percentages might be nice here (and in several other places as well).