This is really handy, thanks Sivaram for the contribution!
Added it to my .tmux.conf permanently.
However, if anyone is wondering why it doesn't work for them,
there is a small error in the code posted:
after "tmux new -s float" there is one backslash too much before the ";"
This works for me:
------------------------------------------------------------------------------
bind-key -N "Toggle persistent popup shell" \
-n F4 if-shell -F '#{==:#{session_name},float}' { detach-client } \
{ popup -E -w60% -h60% \
'tmux attach -t float || tmux new -s float; \
display-message "Press PF4 to toggle floating popup or Ctrl-D to kill it"' \
}
------------------------------------------------------------------------------
Cheers,
Tobias
> Gesendet: Donnerstag, 17. Juni 2021 um 09:09 Uhr
> Von: "Sivaram Neelakantan" <
nsivar...@gmail.com>
> An:
tmux-...@googlegroups.com
> Betreff: Re: popup issue in 3.2a
>
> On Wed, Jun 16 2021,Nicholas Marriott wrote:
>
> > You probably want the -E flag to display-popup.
> >
>
> Right, that worked as intended; now the popup goes away on F4 or on Ctrl-D
>
> { popup -E -w70% -h70% \
>
> Thanks for this.
>
> [snipped 43 lines]
>
> > bind-key -N "Toggle persistent popup shell" \
> > -n F4 if-shell -F '#{==:#{session_name},float}' { detach-client } \
> > { popup -w70% -h70% \
> > 'tmux attach -t float || tmux new -s float \;\
> > display-message "Press PF4 to toggle floating popup or Ctrl-D to kill it"'\
> > }
>
> [snipped 32 lines]
>
> sivaram
> --