Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Horizontal customizability (menu width, horizontal alignment, text alignment) #194

Open
Hubro opened this issue Aug 3, 2021 · 12 comments

Comments

@Hubro
Copy link

Hubro commented Aug 3, 2021

bemenu seems to always cover 100% of the width of the monitor. I have several very wide monitors, so bemenu is taking up a ton of space.

image

(This is just a 16:9 monitor, at home I have both a 21:9 and 32:9 where this issue is much more pronounced)

It would be super neat to have some more horizontal customizability, like:

  • Menu width (in px or %)
  • Horizontal menu position (left, center, right)
  • Text alignment (left, center, right)

It would look so much nicer if I could limit the width of bemenu to (for example) around 400px:

image

On my 32:9 monitor it would also be a massive user experience boost to be able to center the menu. Currently the menu covers the entire width of the monitor and the text is at the far left. On a monitor that wide, it means I have to turn my head to see the text, plus the menu covers the bottom half of the monitor, which is a 5120x720 px area.

@Cloudef
Copy link
Owner

Cloudef commented Aug 3, 2021

Good idea, this should not be that hard I think.

@stacyharper
Copy link
Contributor

Center mode has been merged recently -c. I'm also working on disabling the spacing with somekind of (-s).

@rieje
Copy link

rieje commented Sep 21, 2021

I tried --center and I think it's better to have Y position instead:

Center looks nice until you start narrowing the list down and the prompt jumps up and down because it centers the entire window--kind of makes me dizzy. A better option would be to center around the prompt instead (behaves like the default where the prompt is fixed on top or bottom), but items on the list would make the overall window lower than center. Hence why Y position (allowing specifying it as a % e.g. 35% from the top of the display to begin the prompt position) is strictly better.

And ditto for horizontal.

P.S. I'm a complete noob wrt building and built bemenu-git by modifying the broken PKGBUILD to this (I only need support for wayland and want curses).

I'm not seeing the --center option in man bemenu. Also, this option appears to have a set width that covers maybe 80% of the screen, not sure if this is expected.

@stacyharper
Copy link
Contributor

stacyharper commented Sep 21, 2021 via email

@stacyharper
Copy link
Contributor

stacyharper commented Sep 21, 2021 via email

@Hubro
Copy link
Author

Hubro commented Sep 30, 2021

Currently, both -c/--center and -b/--bottom are more or less unusable. Since it's not possible to set a static height, the input prompt keeps jumping around as the number of search results change.

For -c/--center to be usable, there also needs to be a --height parameter to lock the result box to a certain height.

For -b/--bottom to be usable, there could also be an option to display the prompt below the box, rather than on top. In that case, the prompt would not move as the height of the box changed.

These would both be great additions, but for me, it's much more critical to be able to limit with width of the bemenu box. Here's how it currently behaves on my 5120x1440 monitor 😅

image

It would be a massive user experience upgrade to be able to limit the width of the box and place it at the center of the screen.

@alternateved
Copy link

--center with possibility to limit the width would be a really amazing feature.

When it comes to limiting height @Hubro, I use --list option with a number argument to limit the height of the bemenu box.

@Hubro
Copy link
Author

Hubro commented Oct 9, 2021

--center with possibility to limit the width would be a really amazing feature.

When it comes to limiting height @Hubro, I use --list option with a number argument to limit the height of the bemenu box.

That doesn't lock the height of the box, it only sets the max height, in lines. As soon as you start typing and the number of results reduce, the height of the box is also reduced. This causes the prompt to jump around as you type, making it a terrible user experience.

@rieje
Copy link

rieje commented Dec 22, 2021

I'm not seeing the --center option in man bemenu. Also, this option appears to have a set width that covers maybe 80% of the screen, not sure if this is expected.
Maybe because you openned /usr/man/… and not /usr/local/man/… where your builded version has been installed

I switched to the official release and still don't see those options in the man page. Someone else experieincing the same thing: #216

@merrittlj
Copy link
Contributor

I've made a pull request for a fixed height feature, I can look into the rest of the customizability as well.

@merrittlj
Copy link
Contributor

I just noticed that there is a -'M' flag, essentially setting the width of the window. I'm not sure how worth it is to make text alignment, but for now this issue should be mostly solved.

@quite
Copy link
Contributor

quite commented Dec 17, 2024

The --fixed-height that @merrittlj added is very useful in combination with --list N (and also --bottom or --center). There is also --width-factor N, which can for example be set to 0.5 to have bemenu occupy half width of the screen.

It would also be very nice to have a --height-factor N, to be able to similarly fill for example half of the screen height -- it should calculate the number of lines that fit, and take precedence over --list (but perhaps --list up or --list down should still be allowed, for making that setting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants