I have a keybinding in tmux for swapping the current and marked (
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.