Open
Description
Problem Description
When you open a floating pane with the default width and height, it opens at the center of the screen.
zellij run --floating --close-on-exit -- top
However, when you specify a non-default width and/or height, the position of the pane is not adjusted accordingly to remain centered.
zellij run --floating --close-on-exit --width 80% --height 80% -- top
zellij run --floating --close-on-exit --width 30% --height 30% -- top
So the users have to manually calculate the right coordinates to put it back at the center.
# (100% - 80%) / 2 = 10%
zellij run --floating --close-on-exit --width 80% --height 80% --x 10% --y 10% -- top
This process is even more cumbersome when an absolute width or height is provided, because you need an extra step of getting the size of the terminal beforehand.
Suggestion
Always start a floating pane at the center of the screen regardless of the specified dimensions, so no manual calculation is needed.
Expected effect
Better user experience.
Alternative solution
Make --x
and --y
take special values like center
or C
, similar to -xC -yC
in tmux.
Metadata
Metadata
Assignees
Labels
No labels