anki-code / xonsh-prewarmed

Run interactive xonsh shell session in milliseconds using prewarmed session from the background.
Apache License 2.0
6 stars 1 forks source link

the prompt in the middle of the screen #1

Open anki-code opened 1 year ago

anki-code commented 1 year ago

From @StitiFatah:

Using xonsh-prewarmed you can reserve xonsh session in background.

Thanks works like a charm, but is there any particular reason it spawns the prompt in the middle of the screen and not at the top (requiring to use clear )? Tested with kitty alacritty and xterm

![xonsh_middle_screen](https://github.com/xonsh/xonsh/assets/68331131/b555dcf0-d7d8-4443-bd95-892e9b7b2917)
anki-code commented 1 year ago

Hi @StitiFatah! It depends on how GNU Screen is working and it is pretty old tool. I didn't try to find a solution. It will be cool to implement the same logic in modern window managers like tmux. If anybody find the solution for Screen feel free to make a PR.

StitiFatah commented 1 year ago

Hi and thanks for your response ! I unfortunately don't use tmux, It's a minor annoyance anyway but in a hacky way isn't there a way to perform a clear immediately after the prompt is available ?

anki-code commented 1 year ago

Ah, I realized. Because we prewarm xonsh in the background the actual window size is not known. You can also use Ctrl+L to clear the screen.

Please also update xonsh to 0.14.0 e.g. xpip install -U xonsh.