kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.49k stars 979 forks source link

Setting for initial layout (horizontal/vertical) when opening up a window inside kitty #7835

Closed excited-bore closed 1 month ago

excited-bore commented 1 month ago

When I open kitty like this:

kitty_1window

and I open a new window (with ctrl+shift+enter), I get this:

kitty_vertical

I would like this new window to always be horizontal, like full in height and split in width EDIT: When changing layout with ctrl+shift+l to the full height layout it does give the desired result

Im sorry if this is already a feature, I just couldn't find it anywhere (apart from limiting enabled_layout, which I rather keep to the default *)

Is your feature request related to a problem? Please describe. Not really, it's purely a nicety to have

Describe the solution you'd like A setting that allows this in kitty.conf, like layout new-window: horizontal/vertical/??? or maybe enabled_layout_initial: verical

kovidgoyal commented 1 month ago

use the splits layout then you can control which direction the split happens by using an argument to the launch command in the map.

https://sw.kovidgoyal.net/kitty/launch/

excited-bore commented 1 month ago

Got it!

So by changing:

map kitty_mod+enter new_window(_with_cwd) enabled_layouts *

to

map kitty_mod+enter launch --location vsplit (--cwd=current) enabled_layouts splits,stack,tall,vertical,horizontal,grid,fat

, I got the desired result.

(splits as the initial layout with launch --location vsplit as the command to open up a new vertical window)

kitty_vertical_yess

Thanks for the explanation! :grin: