hstr icon indicating copy to clipboard operation
hstr copied to clipboard

Reversed vertical view + help location option

Open rossjudson opened this issue 9 years ago • 11 comments

hh is awesome! I often have shells on a second monitor that's rotated 90 degrees. I'm normally working on a prompt at the bottom, but when I invoke hh the prompt is at the top, which is a long, long way from where my eye is focused.

Does a reversed vertical mode make sense? The hh prompt appears at the bottom, and the history displays above it.

rossjudson avatar Aug 14 '15 16:08 rossjudson

Yes, it makes perfect sense! Thank you for a great suggestion.

dvorka avatar Aug 14 '15 18:08 dvorka

I also would like to support this idea! I realise the long long focus distance every time since you reported this ;)

nkoester avatar Aug 18 '15 16:08 nkoester

The need for a feature like this immediately ran trough my mind when I started using hh (just today, great stuff), so +1!

kohanyirobert avatar Feb 24 '16 22:02 kohanyirobert

I just pushed an initial version of reverse view - check screenshot below. If you are able to build from source, please give it a try. Feedback and bugreports will be highly appreciated!

bottom-prompt

You may activate it by configuring hh as follows:

export HH_CONFIG=hicolor,prompt-bottom

dvorka avatar Mar 24 '16 22:03 dvorka

It works, however right now I'm so used to the default behaviour that it feels weird using this. :)

A few things/ideas.

The "how-to" part, these lines

- HISTORY - view:ranking (C-7) - match:keywords (C-e) - case:insensitive (C-t) - 771/1791/0 ----------------------------------------------------------------------------------------------------------------
Type to filter, UP/DOWN move, DEL remove, TAB select, C-f add favorite, C-g cancel

are breaking my focus, it should be at the top in this bottom view. Actually using the default layout it should be on the bottom. Right now if I use the default layout I'm not bothered by this only, because I've managed to get used to lifting my line of sight immediately to the top when I press C-r. Better yet, it should be hidden by default. It is useful only for a couple of hours really. The manual should be plenty enough. And of course there could be an option to control its location (default, top, bottom, hidden).

The other thing that is breaking my focus is that I use a "two-liner" prompt:

<user>@<host> ~
$ 

and when I press C-r the prompt in hh will change to a different one (the color is different, but that's not a big issue). It would be nice if the prompt would stay as is.

kohanyirobert avatar Mar 30 '16 15:03 kohanyirobert

Thank you for the comprehensive feedback - I really appreciate it!

... how-to lines...

I re-implemented screen rendering, therefore moving these lines w/o changing orientation should be much simpler now.

... there could be an option to control its location (default, top, bottom, hidden)...

Agreed - I will make it another option.

Better yet, it should be hidden by default. It is useful only for a couple of hours really.

This is a great point!

"two-liner" prompt

Perhaps you could try export HH_PROMPT="$ " (in case you don't need to see user/host all the time).

dvorka avatar Apr 08 '16 06:04 dvorka

HH_PROMPT='$ ' would work well enough I think. Still, I'm so used to the default here also, that when I've changed it my eyes just couldn't adjust :D They're focusing 15 or so characters right from the left side of the terminal automatically. Weird :D

kohanyirobert avatar Apr 08 '16 07:04 kohanyirobert

I exactly know what you are writing about - I'm stuck with the default hh layout ;)

dvorka avatar Apr 08 '16 08:04 dvorka

To add some feedback to this: I changed to the reversed view as soon as you added this. It did take some time to get used to but once I got used to it I realised I don't want to go back :) I use it every day and haven't had any issues with it so far

nkoester avatar Jul 19 '16 08:07 nkoester

@nkoester :+1:

dvorka avatar Jan 12 '17 16:01 dvorka

I believe I fixed this issue :) We now have three additional options:

  • help-on-opposite-side
  • hide-basic-help
  • hide-help

See https://github.com/dvorka/hstr/blob/dev/2.2.0/CONFIGURATION.md#positioning

This issue may be closed now.

bibermann avatar Dec 16 '19 20:12 bibermann