atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.87k stars 562 forks source link

dynamic UI orientation? #1468

Open lilydjwg opened 10 months ago

lilydjwg commented 10 months ago

I want the UI to be reverted only when the cursor is at the top half of terminal so that the cursor in the UI is near where it was at the shell prompt.

ellie commented 10 months ago

Could you describe this a little more please? I'm not entirely sure what you mean

lilydjwg commented 10 months ago

When you open a new terminal window or do a clear command / Ctrl-L, the cursor is near the top, so I'd like atuin to be "inverted" to avoid looking down. Likely, after some time the cursor comes down to the bottom of the terminal, and I'd like atuin not to be inverted.

I've digged into atuin more, and find that there needs to be a --invert flag to atuin search -i so that the shell can use it depending on where the cursor is.

lilydjwg commented 10 months ago

Like this https://github.com/lilydjwg/atuin/commit/4fbeb67ccad4f8aea82991b7bda9b8d4334a425c and https://github.com/lilydjwg/dotzsh/blob/master/plugins/atuin.zsh#L18-L30