zellij icon indicating copy to clipboard operation
zellij copied to clipboard

Configure the size/location of floating panes before opening them

Open Integralist opened this issue 3 years ago • 12 comments

I love opening up a preview pane, but it's just a bit too small for my use cases, and so being able to configure the dimensions would be super helpful.

Thanks! Loving Zellij, thank you for sharing ❤️

Integralist avatar Oct 05 '22 14:10 Integralist

Hey, thanks for contributing :)

What do you mean by the preview pane / What do you do to open it?

raphCode avatar Oct 05 '22 15:10 raphCode

👋🏻

This is what I'm referring to when I say "preview pane"...

Screenshot 2022-10-05 at 16 10 29

I typically run tests in the preview window, just as a single example, and typically the height is just small enough to force me to have to scroll every time to see stuff outside of the current viewport size.

Considering my main monitor is so large, I have vertical and horizontal real-estate I can eat into, and so being able to configure it to be like 20% bigger either all around (top/right/bottom/left) or just top/bottom would be amazing and would greatly improve my quality of life as the need to have to scroll to see content in the preview pane can be quite tedious 🙊 (like I say I nearly always have to scrollback to see stuff).

Integralist avatar Oct 05 '22 15:10 Integralist

You can increase the size of floating panes just like you increase the size of other panes. Try alt + or alt - for example

imsnif avatar Oct 05 '22 15:10 imsnif

AHHH!!!!! Thanks @imsnif 🙂 that worked great.

Integralist avatar Oct 05 '22 16:10 Integralist

Sorry, but I have to ask again because I am not completely happy with the answer. The problem is that it is very annoying to manually enlarge the window again and again. I open the floating pane with zellij run. So it would be nice if there would be a parameter for zellij run or there would be a default value in the configuration.

Or is my workflow wrong? Whenever I want to commit, for example, I run zellij run --floating -- gitui

SimonMonecke avatar Oct 26 '22 07:10 SimonMonecke

Your workflow is not wrong @SimonMonecke - and I definitely want to allow the size and location of floating panes to be configured (both from the CLI with zellij run and from the layouts), but right now it's not possible.

What I would suggest for your flow is to keep the floating pane open and then toggle its visibility with ctrl+p + w. Then you only have to enlarge it the first time.

I'm reopening this issue and renaming it to reflect this.

imsnif avatar Oct 26 '22 07:10 imsnif

I would like to suggest that we could configure a pane_template in some layout file which can be referenced in a zellij run command. Then, often used commands can be saved there as well as the size and appearance of the pane it will open in.

raphCode avatar Oct 26 '22 11:10 raphCode

I agree that this would be a very nice feature. A configuration could re-use the x, y, width, height values of floating panes on layouts.

sebastiancarlos avatar Apr 23 '23 22:04 sebastiancarlos

Your workflow is not wrong @SimonMonecke - and I definitely want to allow the size and location of floating panes to be configured (both from the CLI with zellij run and from the layouts), but right now it's not possible.

What I would suggest for your flow is to keep the floating pane open and then toggle its visibility with ctrl+p + w. Then you only have to enlarge it the first time.

I'm reopening this issue and renaming it to reflect this.

I have a similar requirement. I wonder what prevents us to implement it

YuFei29 avatar Jun 17 '23 06:06 YuFei29

I agree that this would be a very nice feature. A configuration could re-use the x, y, width, height values of floating panes on layouts.

Usually, even huge monitors are ultra-wide and not ultra-high, so the main problem is height which is too precious of a space to chop it into thirds for floating windows.

Even if there was a single config option like default_floating_height = "85%", this could already be a humongous win.

aldanor avatar Nov 28 '23 03:11 aldanor

Are there any updates regarding this feature request? I would also like this feature to be implemented.

(Thanks for the great work and effort. I love using zellij and the pleasant experience it provides)

aadi58002 avatar Jan 19 '24 05:01 aadi58002

Just came across this issue having the same problem; not being able to configure floating pane sizes for custom keybindings is a big bummer when transitioning from tmux (I'm used to running lazygit in a floating pane).

I was quite surprised that this issue's still open, have there been any alternative ways to achieve this?

janbiasi avatar Jan 27 '24 10:01 janbiasi

Yes this would definitely be a nice feature add to have the ability to resize and position the panes as desired by default prior to opening zellij (in my case I wanted each floating window to appear at the top right of my screen since I am constantly moving it to that location when running unit tests)

smsossah avatar May 29 '24 11:05 smsossah