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

Add support for --tmux-title option #4155

Closed
wants to merge 1 commit into from

Conversation

afh
Copy link

@afh afh commented Jan 2, 2025

Personally I see value in adding support for a --tmux-title option, with which a title for the tmux popup can be set (see -T option of display-popup command in tmux(1)). This option would only work in combination with the --tmux option and look better if the --no-border option is set as to avoid rendering two borders: one from fzf and one from tmux, rendering the tmux border is required in order to display the title.

Please note that this is just a minimal working proof-of-concept. If the maintainers and folks using fzf find this useful and would consider this for inclusion, I'd be happy to elaborate on this PR; ideally with some guidance from the maintainers given that I'm rather unfamiliar with fzf's codebase.

@afh afh force-pushed the add-tmux-title-option branch from a3556ec to a8a639b Compare January 2, 2025 15:06
@junegunn
Copy link
Owner

junegunn commented Jan 2, 2025

I would suggest that you use --border-label instead. You can configure the position of the label using --border-label-pos and it also supports ANSI color codes. Do you think you still need to use -T option?

fzf --tmux --border-label ' Hello '

fzf --tmux --border-label ' Hello ' --border-label-pos 2

fzf --tmux --border-label $' \x1b[33mHello '

@afh
Copy link
Author

afh commented Jan 3, 2025

Thank you for the quick and helpful response, @junegunn, very much appreciated! Exactly what I'm looking for; not sure how I missed this when skimming through fzf(1) while looking for title.

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.

2 participants