Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tmux popups #3878

Open
alexherbo2 opened this issue Nov 11, 2020 · 4 comments
Open

Add support for tmux popups #3878

alexherbo2 opened this issue Nov 11, 2020 · 4 comments

Comments

@alexherbo2
Copy link
Contributor

Floating scratch terminal in tmux

Example of a use case:

connect tmux-terminal-popup :fzf

It could be nice to introduce the notion of popup commands.

alias global popup tmux-terminal-popup

See wez/wezterm#270.

@alexherbo2
Copy link
Contributor Author

I created alacritty.kak supporting alacritty-popup (through class configuration). It is a first step toward it.

@vbauerster
Copy link
Contributor

vbauerster commented Mar 15, 2021

Implementation candidate:

hook global ModuleLoaded tmux %{
    define-command tmux-terminal-popup -params 1.. -shell-completion -docstring '
    tmux-terminal-popup <program> [<arguments>]: create a new terminal as a tmux popup
    The program passed as argument will be executed in the new popup' \
    %{
        tmux-terminal-impl 'display-popup -E -h 75% -d #{pane_current_path}' %arg{@}
    }
}

@alexherbo2
Copy link
Contributor Author

@vbauerster I don’t recall exactly the needed parameters, but from tmux#2475 I needed the following command:

tmux display-popup -d "$PWD" -K -E -R -- sh -c 'some-command "$@"' -- "$@"

@vbauerster
Copy link
Contributor

-K and -R have been removed since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants