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

Multiple keybinds — library functions? #61

Open
mcint opened this issue Mar 27, 2023 · 2 comments
Open

Multiple keybinds — library functions? #61

mcint opened this issue Mar 27, 2023 · 2 comments

Comments

@mcint
Copy link

mcint commented Mar 27, 2023

My primary use, that drove me to search for this, and quickly install it, is for a nicer filter list for pane searching (ideally including tmux's in-buffer search, when searching for panes). Something like tmux choose-tree -w, #20. I'm tempted to restrict or set environment variable defaults, so I can, at one keypress, be interactively fzf filtering panes.

However this tool does a wonderful job to make visible the levels to make better and more full use of tmux. Session control and fzf filtering for keybinds improves on even the upgrades to tmux in version 2 when submit-query filtering of keybinds was made possible. I like these functions that you expose, and want to use them to make better use of all that tmux has to offer.

Does the tmux plugin paradigm support you defining a function where users could write their bindings calling to customized invocations of the function.

bind -n C-S-p tmux-fzf-call 'pane' 'switch' '*'
bind -n C-S-m tmux-fzf-call 'pane' 'switch|move' '*'
bind -n C-S-m tmux-fzf-call 'pane|window' 'create|switch|move' '*'

I want my 1 specialized bind invocation, for now. But I really like to have the API of tmux laid out as a series of choices, I can "choose from a set", which is a nicer problem than "remember the functions available, and their flags and arguments, and compose them correctly in a one-shot prompt line". Thank you!

@sainnhe
Copy link
Owner

sainnhe commented Mar 27, 2023

Do you mean this: #6

@mcint
Copy link
Author

mcint commented Mar 27, 2023

Hmm, yes. Hmm, looks like it just supports pre-selecting individual options, not pre-winnowing. Looks like you've solved this. And well enough that it was your first response to another issue. Thank you! Guess I might still request it appear in the FAQ, even folded away.

It looks like scripts/window.sh does not support using tmux's find-window command. I find I'm already missing the filter on buffer contents, e.g. I often know the window I want by the directory, which appears in shell prompt, or other buffer text that tmux does not surface for searching in other ways. Possibly PR incoming.

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

No branches or pull requests

2 participants