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

Remove '-L' option from wofi command #146

Open
ndcontini opened this issue Jul 27, 2023 · 3 comments
Open

Remove '-L' option from wofi command #146

ndcontini opened this issue Jul 27, 2023 · 3 comments

Comments

@ndcontini
Copy link

In menu.py, -L is used to specify the height of the menu. However, this interferes with the user's wofi settings. For example, I have set wofi to spawn on the left side of the screen with the height of the entire screen. The -L overrides the height setting I've made and instead makes wofi spawn at approximately a third of the height of the entire screen. I'm not entirely certain how useful it is to specify this parameter by default; in my mind it should be up to the user to configure wofi how they would like or wrap keepmenu appropriately if they want a keepmenu specific configuration. Right now I have to work around this by editing menu.py, but it'd be nice if the parameter was removed upstream or at least a user options to control this behavior was added.

Note: I'm not sure how this is affects other menus like rofi and what not.

https://github.com/firecat53/keepmenu/blob/14b27829a2a3259fe826c4cead44bc2f8be4684e/keepmenu/menu.py#L20C1-L36C19

To reproduce:

  1. edit $XDG_CONFIG_HOME/.config/wofi/config and add the option height=100%, or any user specified height really.
  2. run keepmenu. You'll see that this setting is not kept, despite other wofi instantiations working correctly.
@firecat53
Copy link
Owner

firecat53 commented Aug 15, 2023

This one is a bit complicated. Keepmenu attempts to set a dynamic height based on the number of lines of input. There's no provision in keepmenu for any of the launchers to set a completely static height, just a maximum height.

None of the other supported launchers have a --height parameter like Wofi that is set in pixels or percent, just a --lines for a max number of lines to show.

I'll leave this open in case someone wants to attempt a PR.

Hopefully I at least answered your questions!

Edit: I did test Wofi and the -L parameter does seem to override the -H parameter no matter what order they are passed.

firecat53 added a commit that referenced this issue Aug 15, 2023
@ndcontini
Copy link
Author

The thing I don't understand is why it is beneficial to pass this parameter from keepmenu to the underlying launcher. From my point of view it is an anti-feature because it is overriding my launcher's config. Do the dimensions of the launcher
seem off if the max number of lines isn't passed or something? Is this essentially to prevent the entries in the launcher from spilling off the screen?

@firecat53
Copy link
Owner

I see your concern. To my eyes, it seems that having a large launcher window is "ugly" when I'm only displaying a few entries or requesting a password. If I'm understanding you correctly, you like a fixed-sized launcher window no matter how many entries there are?

It would be fairly easy to take away the -l option and just let the launcher parameters decide how big the window is. However, it's not so easy to allow a 'dynamic' size from one line for a password up to a max height that is defined by -l while still allowing for -l to be the fixed height if desired. Not impossible...just more complex.

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

No branches or pull requests

2 participants