Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(panes): allow specifying coordinates for a new floating pane through the CLI or plugins #3122

Merged
merged 6 commits into from
Feb 8, 2024

Conversation

imsnif
Copy link
Member

@imsnif imsnif commented Feb 8, 2024

This adds the must requested feature of specifying coordinates (x, y, width, height) for floating panes opened from the CLI with the various new_pane commands (zellij run, zellij edit, zellij plugin, etc.) as well as through the plugin API.

Coordinates can be specified either in fixed numbers (eg. 1) or percentages (eg. 25%).

Example:

# opens a new floating pane running "cargo test" at the specified coordinates
zellij run --floating -x 10 -y 25% --width 100% --height 20% -- cargo test

All of these coordinates are optional, omitting some of them will merge them with the default location for the next pane according to the currently active swap layout. Coordinates that exceed the viewport will be truncated on a best-effort basis.

@imsnif imsnif merged commit 326c8cd into main Feb 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant