hstr
hstr copied to clipboard
Reversed vertical view + help location option
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.
Yes, it makes perfect sense! Thank you for a great suggestion.
I also would like to support this idea! I realise the long long focus distance every time since you reported this ;)
The need for a feature like this immediately ran trough my mind when I started using hh
(just today, great stuff), so +1!
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!
You may activate it by configuring hh
as follows:
export HH_CONFIG=hicolor,prompt-bottom
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.
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).
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
I exactly know what you are writing about - I'm stuck with the default hh
layout ;)
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 :+1:
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.