Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to name my tmux windows and select them using fuzzy matching (similar to LustyJuggler or Ctrl-P in vim).

Is this possible with tmux?

share|improve this question

Tmux can't do that by default.

Google doesn't return many results and this question is number two or three depending on the query but these zsh scripts might be interesting.

share|improve this answer

I don't think that's necessary.

You can see the index of every window at the status line, then a PREFIX+number will bring you anywhere you want, much quicker than any search.

If you have so much windows to need a search, maybe they are too much.

share|improve this answer
    
I think you can not easily judge what's necessary for the OP... For example, I do not use multiple tmux windows, but separate terminal windows - about 20, often - on 16 virtual screens. My firefox has about 100 tabs open normally - do you think that's too much? I don't (Ok, sometimes...). – Volker Siegel Mar 25 at 6:43

Here are links to scripts that use fzf to fuzzy search and select a pane:

https://github.com/junegunn/fzf/wiki/Examples-(tmux)#select-pane

https://github.com/junegunn/fzf/wiki/Examples#tmux

I guess it won't be too hard to adjust those for fuzzy searching windows.

EDIT:

Change this line:

panes=$(tmux list-panes -s -F '#I:#P - #{pane_current_path} #{pane_current_command}')

To:

panes=$(tmux list-panes -s -F '#I:#P #W - #{pane_current_path} #{pane_current_command}')

(I added the #W which also prints the window name)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .