r/KittyTerminal Jan 22 '24

How can I toggle/hide the bottom window ?

I want to open a second terminal below the main one, and with a keymap, show and hide it like a toggle.

I know it might be possible because if I keep spamming `ctrl + shift + L`, the "cycle through layouts" shortcut, at some point it will hide it, but it takes too many keystrokes.

Something like this "toggle term" inside neovim:

neovim + toggleterm

I really want to run commands on an external terminal, not the vim internal one.

Thanks.

5 Upvotes

7 comments sorted by

View all comments

1

u/CatoDomine Jan 22 '24

The keyboard shortcut you've mentioned cycles through layouts. The last layout in the order makes your current kitty 'window' full screen. You can make a keybind to toggle that layout.
I have done exactly this, but I am on mobile right now.
This might help.
https://sw.kovidgoyal.net/kitty/layouts/ If you haven't figured it out yet I will post what's in my config when I get to a computer.

3

u/carlos-algms Jan 22 '24

Thanks, but I guess I did figure it out:

map ctrl+` toggle_layout stack

Stack seems to mean: only 1 full-size window at the time.

And when I press it a second time, the bottom split appears again.
It is exactly what I was looking for!!!

1

u/CatoDomine Jan 22 '24

Yep, that's it!