popup issue in 3.2a

36 views
Skip to first unread message

Sivaram Neelakantan

unread,
Jun 16, 2021, 12:08:55 PM6/16/21
to tmux-...@googlegroups.com
hi,

The popup listing freeze issue that I reported earlier seems to have
gone away and now I have a new issue for the minimal .tmux file attached.

1. The PF4 toggle launches the float just fine but hitting PF4 again
keeps the floating pane which is now completely blank with a pane text
can't find session: float
[detached (from session float)]

Even though I see this, the session is there and detached

2. Hit ESC the blank pane goes away. PF4 again brings back the
session float without any issues and able to work in it

3. Hit Ctrl D, the session terminates but the popup remains with
[exited] within the pane. Again, ESC makes the pane go away and there
is no session called float any more.

What should happen?
1. PF4 should toggle the popup
2. Ctrl-D should kill the popup and make the pane disappear

In each of the above, ESC key seems to be an additional key press to
make it happen. which is suboptimal.


$ tmux -V
tmux 3.2a

--8<---------------cut here---------------start------------->8---
set -g prefix c-z # changes prefix key sequence from c-b to c-z
unbind C-b
#use emacs style key bindings
set -g status-keys "emacs"
#more intuitive mapping to split windows
bind -N "Split window horizontally" | split-window -h -c '#{pane_current_path}'
bind -N "Split window vertically" - split-window -v -c '#{pane_current_path}'
# unbind the default keys for splitting windows
unbind '"'
unbind %
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-no-clear pbcopy
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"'\
}
--8<---------------cut here---------------end--------------->8---

# was done inside tmux to check how the minimal file was parsed
--8<---------------cut here---------------start------------->8---
~$ tmux source -v .tmux.conf.float_test
/home/user1/.tmux.conf.float_test:35: set-option -g prefix c-z ; unbind-key C-b
/home/user1/.tmux.conf.float_test:37: set-option -g status-keys emacs
/home/user1/.tmux.conf.float_test:39: bind-key -N "Split window horizontally" | split-window -h -c "#{pane_current_path}"
/home/user1/.tmux.conf.float_test:40: bind-key -N "Split window vertically" - split-window -v -c "#{pane_current_path}"
/home/user1/.tmux.conf.float_test:42: unbind-key \"
/home/user1/.tmux.conf.float_test:43: unbind-key %
/home/user1/.tmux.conf.float_test:44: bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-no-clear pbcopy
/home/user1/.tmux.conf.float_test:50: bind-key -n -N "Toggle persistent popup shell" 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\\\"\""
--8<---------------cut here---------------end--------------->8---

$ tmux -v -v -f .tmux.conf.float_test

attached log file of interactions

float.tar.gz

Nicholas Marriott

unread,
Jun 16, 2021, 12:29:03 PM6/16/21
to Sivaram Neelakantan, tmux-users
You probably want the -E flag to display-popup.


--
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 tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/krpqx35yyddc76.fsf%40gmail.com.


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 tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/krpqx35yyddc76.fsf%40gmail.com.

Sivaram Neelakantan

unread,
Jun 17, 2021, 3:09:55 AM6/17/21
to tmux-...@googlegroups.com
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
--

Reply all
Reply to author
Forward
0 new messages