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" <[email protected]>
> An: [email protected]
> 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
> --

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/trinity-c76e0f46-1165-46ef-ba08-84a989a478a6-1625661123367%403c-app-gmx-bap46.

Reply via email to