Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Feature: Results should be visible in any terminal size #207

Closed
psukys opened this issue Oct 24, 2017 · 4 comments
Closed

Feature: Results should be visible in any terminal size #207

psukys opened this issue Oct 24, 2017 · 4 comments

Comments

@psukys
Copy link

psukys commented Oct 24, 2017

Currently, the default is always showing 10 results, whereas this could be dynamically set through interpretting the size of the terminal window.

It seems that tput lines does the job (tested on xterm, gnome-terminal, and in separate tty - ctrl+alt+f3 i.e.), thus this could be estimated beforehand

@zmwangx
Copy link
Collaborator

zmwangx commented Oct 24, 2017

whereas this could be dynamically set through interpretting the size of the terminal window.

Each result occupies an unknown number of lines, so this is not possible.

@jarun
Copy link
Owner

jarun commented Oct 24, 2017

  1. Most terminals support scrollbars and mouse scroll.
  2. Most terminals support a default size. Use the option -n to set the number of results to show per page depending on the default size of your terminal. I use 7, for example.

@jarun jarun closed this as completed Oct 24, 2017
@psukys
Copy link
Author

psukys commented Oct 25, 2017

@zmwangx strongly disagree, since you can always find it before printing out.

@jarun I am unsure of the typical googler workflow, as it offers interactive mode, but the one needs to use scrollbars (?). Beats the purpose of it being a terminal app.

What I'm proposing is having some special parameter that instead of trying to manually figuring out how many results should be shown, the program would use current terminal's properties in doing the job for the user.

@zmwangx
Copy link
Collaborator

zmwangx commented Oct 25, 2017

Sure, please submit a patch, and we'll have a look.

jarun added a commit that referenced this issue Feb 5, 2018
We have explained in #207 our reservations regarding automatically adjusting the
number of search results according to the terminal size in googler. However, we
have the option to show the domain name only instead of the complete URL. This
is a visual change and many modern browsers do it. We cannot make it default at
this stage of the project. So I chose to use an environment variable. There's a
new omniprompt switch (`u`) to toggle it at runtime.
@jarun jarun mentioned this issue Oct 10, 2018
This was referenced Apr 21, 2019
@lock lock bot locked and limited conversation to collaborators Nov 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants