You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when invoking xmenu using xmenu -p 0x0 it shows at position 0,0 (top-left) of the monitor. If I'm not wrong here, following the documentation of XParseGeometry, we should be invoking xmenu -p '+0+0' instead for the same behavior. This causes some ambiguity in positioning the menus.
On the same note, using xmenu -p '-0-0' should theoretically place it at the bottom right of the monitor which would be a good use-case to considering the user is left to do xrandr math in shell.
I'm sure that there are other users who would want to do the same.
personal note:
I ran into this weirdness when I was creating a power menu using xmenu.
That was already fixed on the head of the master branch, but broken on the last tagged release.
I added on commit 4c54b1c a syntax for positioning relative to monitor or X screen.
-p POSITION
Set the position to spawn xmenu. Without this option, xmenu
spawns next to the cursor. POSITION is a string of the form
±X[%]±Y[%][@MONITOR]. The X and Y arguments, and the plus or
minus sign preceding them, are obligatory. The percent signs,
and the part from the at-sign to the end are optional.
• If X (or Y) is preceded by a plus sign +, position is from the
left (or top) edge of the screen.
• If X (or Y) is preceded by a minus sign -, position is from the
right (or bottom) edge.
• If X (or Y) is followed by a percent sign ("%"), position of
the center of the root menu is relative to the width (or
height) of the screen. With no percent sign, position of the
left (or top) corner of the menu is relative to the left (or
top) corner of the screen.
• If MONITOR is specified and is a number, position is relative
to the given monitor number (counting from 0), rather than
relative to the entire X screen. MONITOR can instead be
"current" or "cursor", specifying the monitor where the cursor
is on.
According to the xmenu documentation,
XParseGeometry
is used for parsing the (first part of)-p
option.The
XParseGeometry
documentation says the format should be:[=][<width>{xX}<height>][{+-}<xoffset>{+-}<yoffset>]
But when invoking xmenu using
xmenu -p 0x0
it shows at position 0,0 (top-left) of the monitor. If I'm not wrong here, following the documentation ofXParseGeometry
, we should be invokingxmenu -p '+0+0'
instead for the same behavior. This causes some ambiguity in positioning the menus.On the same note, using
xmenu -p '-0-0'
should theoretically place it at the bottom right of the monitor which would be a good use-case to considering the user is left to do xrandr math in shell.I'm sure that there are other users who would want to do the same.
personal note:
I ran into this weirdness when I was creating a power menu using xmenu.
whenever I added a new item to the menu I have to adjust the y-position using awk as the height of the menu changes.
I hope you see that this is a bit awkward to work with.
The text was updated successfully, but these errors were encountered: