Skip to content

[REQUEST] More intuitive scrolling in grid mode #2227

@pol-rivero

Description

@pol-rivero

Before opening a feature request

  • I checked the next branch to see if the feature has already been implemented
  • I searched existing reports to see if it is already requested.

What is the user problem or growth opportunity you want to see solved?

When using rofi with multiple columns and scrolling up and down using the mouse or keyboard (ml-row-up, kb-row-up, ml-row-down and kb-row-up keybinds), the current scrolling behavior can be unintuitive.

For example, suppose I'm using a theme with 3 rows and 3 columns, and rofi is displaying 18 elements. The elements would be distributed in 2 pages like this:

1  4  7
2  5  8
3  6  9

10 13 16
11 14 17
12 15 18

When I'm in the bottom row of the first page and press the down arrow, I would like to jump to the next page (3 -> 10, 6 -> 13, 9 -> 16). However, it's currently jumping to the next column (3 -> 4, 6 -> 7, 9 -> 10).

I understand that, from an "item index" point of view, the current behavior is more intuitive, and I think it should remain the default. However, it would be nice to have the option to opt in to this (IMO) more intuitive scrolling behavior.

Bonus request:

Additionally, if scroll-method is set to 1, enabling this flag (intuitive scrolling) should also change the scrolling behavior.
In the previous example, suppose that item 5 is selected:

1  4  7
2  5  8
3  6  9

Currently, scrolling down would distort the grid like this:

2  5  8
3  6  9
4  7 10

However, I believe that scrolling the entire grid would be much more intuitive:

2  5  8
3  6  9
10 13 16

How do you know that this problem exists today? Why is this important?

It's important because it improves the user experience of scrolling the item list (which is the core feature of rofi).

Who will benefit from it?

Anyone who displays rofi as a grid (columns > 1).

Rofi version (rofi -v)

Version: 2.0.0-dirty

Configuration

https://gist.github.com/pol-rivero/ae817f10b543a23132c5d8c39463e3d0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions