1

I have a keybinding in tmux for swapping the current and marked (prefix-m) windows:

bind \ swap-window

Also, I have a different version that will ask me for the window to swap with:

bind \ command-prompt -p 'Swap with window:' 'swap-window -t %%'

I would like the first version to be used if there is a marked window, and the second version to be used if there is not a marked window.

Can this be done with tmux? I can't find a way to check whether there is a marked window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.