Take the tour ×  Essentially, I'm looking for a way to keep one
terminal open running tmux, and open new windows inside of the
session rather than spawning new terminals.  On pushing a key
sequence, I'd like to open a new terminal if there isn't one
open. But if there is one open already, I'd like to switch to
its desktop if necessary and focus the window, then send the
command.  I found the documentation for the If action for
windows and I was hoping there was a similar construct for
global actions as well, but I'm not seeing it.  Edit: Solution
I ended up using a simplified version of jw013's script.  The
original script was written for a quake terminal effect, but
what I wanted was simpler: not to toggle a terminal, but simply
to always open a window in a single tmux terminal session. The
key component which I was missing was wmctrl, which I hadn't
heard of.  Using jw013's script as a base, I simplified to:  #
the variable name for the window (used in openbox rc.xml for the
rule as well)  # if we successf