Giter VIP home page Giter VIP logo

Comments (7)

krobelus avatar krobelus commented on August 17, 2024 1

looking closer at tmux-terminal-impl, it seems that it only works properly for the split-* and new-window commands.
For other commands, when using multiple tmux sessions, tmux-terminal-impl will operate in the session that created the kak server, not in the session of the calling kak client.
(see 0fb99f2 (tmux.kak: use TMUX_PANE for tmux-terminal-{horizontal,vertical}, 2020-07-26))
We want to do something similar for popup.

Since we'll already want popup-specific code we can add backgrounding logic for that case only?
I asked on the tmux-users list why "tmux popup" blocks, would be interesting to know.

from kakoune.

Yukaii avatar Yukaii commented on August 17, 2024

The other solution might be to create a standalone tmux-popup command that doesn't depend on tmux-terminal-impl. The split-window stays the current behavior, while tmux-popup runs in the background.

from kakoune.

krobelus avatar krobelus commented on August 17, 2024

Reverting sounds fine. If we had never added the backgrounding behavior, I'd have doubts about adding it because users can always copy tmux-terminal-impl. But since it already worked, it seems better to keep it working.

Out of curiosity, with tmux-popup, how do you make it so you can focus other tmux windows/panes while the popup is showing?
My C-b is being ignored and forwarded to the program running in the popup.

from kakoune.

Yukaii avatar Yukaii commented on August 17, 2024

how do you make it so you can focus other tmux windows/panes while the popup is showing?

I cannot either 😅. I use popups as disposable windows.

For persistent actions like a floating terminal or keeping a lazygit process open, I actually wrote a script to create and automatically attach another tmux session on a popup display.

https://github.com/Yukaii/dotfiles/tree/macos-m3/bin#tmux-popup

Demo

311580080-d901b69d-81b1-4379-937a-66c007f525ca.mp4

from kakoune.

krobelus avatar krobelus commented on August 17, 2024

Is there a use case where one wants to be notified once the popup is closed?
I guess there are but probably not so important

from kakoune.

krobelus avatar krobelus commented on August 17, 2024

something like

tmux-terminal-impl display-popup -E -E sh -c 'sleep 1; date >/tmp/result'
echo %file{/tmp/result}

I guess that's a rare use case, especially given we can't pass $kak_command_fifo to tmux-terminal-impl args

from kakoune.

Yukaii avatar Yukaii commented on August 17, 2024

Is there a use case where one wants to be notified once the popup is closed?
I guess there are but probably not so important

Maybe a non-windowing command like tmux list-session? For me, since tmux-terminal-impl is specifically implemented for windowing commands, vertical/horizontal/popup should behave in the same way. For other tmux commands, people should use regular shell commands.

from kakoune.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.