Pre-checks
Do similar tools already implement this feature?
Yes. bemenu adds and removes visible lines as needed.
Walker also works like this.
Describe your feature request
Fuzzel has a feature where it will display a large app icon if there's enough room for a large icon to display and there are few enough app matches.
But since the default matching algorithm switched to be "fuzzy", these icons may be rarely seen because the algorithm frequently matches /something/ as an additional match.
Here we propose an alternate behavior when the displayed results have been filtered to be less the configured number of lines to display. That is: grow or shrink the window size to match the number of results. Some specifics:
-
The window would never grow larger than --lines, only shrink smaller than that and then possibly grow back to this size as the number of filtered results changes.
-
The top edge of the window and prompt / input line would remain in a constant position on the screen, but the selection list area may shrink or grow.
-
As this is somewhat normal/expected menu behavior to maintain size that fits the content, this would not be a configurable option, but would be the new default behavior. As such the "large icon" code path would never trigger and would be removed.
-
The resizing might be "debounced" so it's not redrawing too frequently due to fast typing that causes the number of rows to change rapidly.
(It would be possible to combine the "large icon" and "shrink-and-grow" feature: If there is exactly one match: grow the window enough to display the large icon.
Note that while this is related to the "--minimal-lines" option, it's not the same thing. --minimal-lines controls the initial window size, possibly making it smaller if the input has fewer input lines configured by "lines" to display. --minimal-line is not concerned with otherwise shrinking or growing the window once filtering stars.
### Pre-checks
- [x] The [fuzzel.ini](https://codeberg.org/dnkl/fuzzel/src/branch/master/doc/fuzzel.ini.5.scd)
and [fuzzel](https://codeberg.org/dnkl/fuzzel/src/branch/master/doc/fuzzel.1.scd) man pages.
- [x] [Changelog](https://codeberg.org/dnkl/fuzzel/src/branch/master/CHANGELOG.md#unreleased)
of newer and unreleased features
### Do similar tools already implement this feature?
Yes. bemenu adds and removes visible lines as needed.
Walker also works like this.
### Describe your feature request
Fuzzel has a feature where it will display a large app icon if there's enough room for a large icon to display and there are few enough app matches.
But since the default matching algorithm switched to be "fuzzy", these icons may be rarely seen because the algorithm frequently matches /something/ as an additional match.
Here we propose an alternate behavior when the displayed results have been filtered to be less the configured number of lines to display. That is: grow or shrink the window size to match the number of results. Some specifics:
- The window would never grow larger than `--lines`, only shrink smaller than that and then possibly grow back to this size as the number of filtered results changes.
- The top edge of the window and prompt / input line would remain in a constant position on the screen, but the selection list area may shrink or grow.
- As this is somewhat normal/expected menu behavior to maintain size that fits the content, this would not be a configurable option, but would be the new default behavior. As such the "large icon" code path would never trigger and would be removed.
- The resizing might be "debounced" so it's not redrawing too frequently due to fast typing that causes the number of rows to change rapidly.
(It would be possible to combine the "large icon" and "shrink-and-grow" feature: If there is exactly one match: grow the window enough to display the large icon.
Note that while this is related to the "--minimal-lines" option, it's not the same thing. --minimal-lines controls the initial window size, possibly making it smaller if the input has fewer input lines configured by "lines" to display. --minimal-line is not concerned with otherwise shrinking or growing the window once filtering stars.