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

[REQUEST] Hide listview until user has typed #1079

Closed
rcarriga opened this issue Mar 29, 2020 · 7 comments · Fixed by #1622
Closed

[REQUEST] Hide listview until user has typed #1079

rcarriga opened this issue Mar 29, 2020 · 7 comments · Fixed by #1622
Assignees
Milestone

Comments

@rcarriga
Copy link

On initial startup the listview can be a bit noisy. It would be great if there was an option to only show elements once the user has typed something (i.e. Filter out all elements if input is empty).

An option like this would work

#listview {
    require-input: true;
}

but that is just off the top of my head.

  • Rofi version: 1.5.4
@vincens2005
Copy link

I would also like this

@DaveDavenport DaveDavenport self-assigned this Apr 20, 2022
@DaveDavenport
Copy link
Collaborator

Is the request to hide elements in the listview? or to hide the listview widget?
I've seen screenshot pasted that suggest the latter, but the issue specifies the first.

@flame-0
Copy link

flame-0 commented Apr 20, 2022

Hide the listview first and then if you type x, it will show the listview.

Example text:
Initial UI: entry only

┌──────────────────────────────────────────────────────────────┐
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ entry: none                                              │ │
│ └──────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘

Following Initial UI: entry and the results

┌──────────────────────────────────────────────────────────────┐
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ entry: hello, world!                                     │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ element─text (from: listview)                            │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ element─text (from: listview)                            │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ element─text (from: listview)                            │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ element─text (from: listview)                            │ │
│ └──────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘

Example video:

default.mp4

example video from https://dribbble.com/shots/14595257-Search-results

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Apr 20, 2022

That drawing is not correct, please see man rofi-theme. That is the exact reason why I asked the question.
Is the request to hide the whole listview (as in screenshots) or hide the elements (as in request) (this will have significant impact on theming/sizing of window).

from manpage:

              ┌────────────────────────────────────────────────────────────────────────────────────┐
              │ window {BOX:vertical}                                                              │
              │ ┌───────────────────────────────────────────────────────────────────────────────┐  │
              │ │ mainbox  {BOX:vertical}                                                       │  │
              │ │ ┌───────────────────────────────────────────────────────────────────────────┐ │  │
              │ │ │ inputbar {BOX:horizontal}                                                 │ │  │
              │ │ │ ┌─────────┐ ┌─┐ ┌───────────────────────────────┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ │ │  │
              │ │ │ │ prompt  │ │:│ │ entry                         │ │#fr│ │ / │ │#ns│ │ci │ │ │  │
              │ │ │ └─────────┘ └─┘ └───────────────────────────────┘ └───┘ └───┘ └───┘ └───┘ │ │  │
              │ │ └───────────────────────────────────────────────────────────────────────────┘ │  │
              │ │                                                                               │  │
              │ │ ┌───────────────────────────────────────────────────────────────────────────┐ │  │
              │ │ │ message                                                                   │ │  │
              │ │ │ ┌───────────────────────────────────────────────────────────────────────┐ │ │  │
              │ │ │ │ textbox                                                               │ │ │  │
              │ │ │ └───────────────────────────────────────────────────────────────────────┘ │ │  │
              │ │ └───────────────────────────────────────────────────────────────────────────┘ │  │
              │ │                                                                               │  │
              │ │ ┌───────────────────────────────────────────────────────────────────────────┐ │  │
              │ │ │ listview                                                                  │ │  │
              │ │ │ ┌─────────────────────────────────────────────────────────────────────┐   │ │  │
              │ │ │ │ element                                                             │   │ │  │
              │ │ │ │ ┌─────────────────┐ ┌─────────────────────────────────────────────┐ │   │ │  │
              │ │ │ │ │element─icon     │ │element─text                                 │ │   │ │  │
              │ │ │ │ └─────────────────┘ └─────────────────────────────────────────────┘ │   │ │  │
              │ │ │ └─────────────────────────────────────────────────────────────────────┘   │ │  │
              │ │ └───────────────────────────────────────────────────────────────────────────┘ │  │
              │ │                                                                               │  │
              │ │ ┌───────────────────────────────────────────────────────────────────────────┐ │  │
              │ │ │  mode─switcher {BOX:horizontal}                                           │ │  │
              │ │ │ ┌───────────────┐   ┌───────────────┐  ┌──────────────┐ ┌───────────────┐ │ │  │
              │ │ │ │ Button        │   │ Button        │  │ Button       │ │ Button        │ │ │  │
              │ │ │ └───────────────┘   └───────────────┘  └──────────────┘ └───────────────┘ │ │  │
              │ │ └───────────────────────────────────────────────────────────────────────────┘ │  │
              │ └───────────────────────────────────────────────────────────────────────────────┘  │
              └────────────────────────────────────────────────────────────────────────────────────┘

@DaveDavenport
Copy link
Collaborator

vote 👍 for hide listview and 👀 for elements.

@flame-0
Copy link

flame-0 commented Apr 20, 2022

That drawing is not correct, please see man rofi-theme

My bad, I just made it simpler.


Following your question, I didn't look at the drawing in the documentation properly, so it confused me that listview is an independent result. I just realized the element is the right independent result inside the listview. The right choice here would be to hide the element instead of the whole listview.

@DaveDavenport DaveDavenport added this to the 1.7.4 milestone Apr 20, 2022
DaveDavenport added a commit that referenced this issue Apr 20, 2022
* [listview] Optional don't show elements when not filtered (#1079)

* [Listview] Fix auto-complete error.
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants