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

Support zellij floating pane via --popup (new name for --tmux) #4145

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

junegunn
Copy link
Owner

No description provided.

@junegunn junegunn self-assigned this Dec 26, 2024
@noahbald
Copy link

Love this, it works super well, pretty much how I'd expect!

@junegunn
Copy link
Owner Author

Thanks for testing it. Here's why this is still marked as a draft.

It currently doesn't work well with non-percent width and height values. Zellij lacks options to open floating windows at the center of the screen, unlike tmux (i.e. -xC -yC), and it makes it difficult, if not impossible, to get it right in a portable way.

Also, as I mentioned in the original discussion, the lack of an option to run a program in a blocking mode forces us to rely on another wrapper script using a temporary named pipe, and it complicates the implementation, which I find unfortunate.

Another problem I noticed is that Zellij somehow fails to process 0 and 0% in the same way as reported in zellij-org/zellij#3447.

zellij run --name fzf --floating --close-on-exit -x0 -- fzf --no-tmux
zellij run --name fzf --floating --close-on-exit -x0% -- fzf --no-tmux

And it makes us have silly code branches in our code, and I'm not so happy with it.

/~https://github.com/junegunn/fzf/pull/4145/files#diff-930cebf5a5e26b62d6004e9d0dca81108461c4fb37caa06877abfce271603719R46-R50

@noahbald
Copy link

I did see that TODO so I hadn't bothered testing that part in particular.
I've seen that blocking mode problem before too which is unfortunate. Though looking at the wrapper script I don't find it too worrisome since it's at least contained within zellij.go -- though I've never worked with Go so I don't know what issues it may bring.
As for the other issues, are you going to wait until they're fixed in Zellij before continuing?

I appreciate you putting time into a fairly niche request anyway, especially given the time of year.

@junegunn
Copy link
Owner Author

I'm going to ask if they're willing to make the floating pane start at the center of the screen by default. It's a little strange that it no longer starts at the center once a custom width or height is given.

Given that zellij-org/zellij#3447 was reported 6 months ago, but no progress has been made, I don't think we can wait for all the issues to be resolved.

@junegunn
Copy link
Owner Author

zellij-org/zellij#3901

@junegunn
Copy link
Owner Author

junegunn commented Jan 3, 2025

Another thing I would like to see from Zellij is an option to disable the border around the floating pane, because fzf has its own --border which is much more flexible and configurable. i.e. --border-label, --color, etc. Related #4155

ibhagwan added a commit to ibhagwan/fzf-lua that referenced this pull request Jan 4, 2025
Replaces `fzf_bin = "fzf-tmux"` as "--tmux" is the preferred method
for both fzf and skim.

Fixed getting the correct width from tmux window/pane for accurate
"flex" layout calculation based on % in setting (default to 50%).

This commit also perpares us better for the upcoming "--popup" option
in fzf in order to support zellij popups.

Ref: junegunn/fzf#4145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants