19个版本

0.6.1-beta2024年8月5日
0.5.1 2023年10月24日
0.4.4 2023年10月19日
0.4.1 2023年7月15日
0.1.0 2023年6月4日

#1 in #terminals

27 每月下载

CC0 许可证

47KB
1.5K SLoC

popup.kak

在kakoune中的终端。

演示

asciicast

安装

先决条件

tmux 必须安装。不需要kakoune在 tmux 下运行,只需安装即可。

  1. 使用 cargo install kak-popup 安装二进制文件。
  2. evaluate-commands %sh{kak-popup init} 添加到您的 kakrc 文件中。

手动

  1. 使用nix或手动将 rc/popup.kak 放入您的autoload目录中安装插件。
  2. 使用cargo或nix安装 kak-popup

用法

在kakoune中

popup [<switches>] <shell-command> <shell-arg1>...: create a modal running
<shell-command> in a terminal. Switches are prefixed with --. The command
and arguments can be passed as a single string or as a series of arguments,
for example, the following two invocations are equivalent:

  popup --title open %{fish -c "some fish command"}

  popup --title open -- fish -c "some fish command"

Popups can be exited using <c-space>.

Switches:
  --kak-script <commands> kakoune script to execute after the shell-command
                          exits, providing any standard output through
                          %opt{popup_output}
  --title <title>         the title of the modal
  --input <input>         input passed as the stdin of <shell-command>
  --on-err <on-err>       what to do on non-zero exit status
            warn          show a modal with stderr
            dismiss       dismiss modal without running KAK_SCRIPT
            ignore        ignore status and always run KAK_SCRIPT
  --padding               the amount of padding around the height and width
                          of the popup. defaults to 16.

示例

以下是一些使用popup.kak的可能方式

# open a shell
popup fish

# a file picker
popup --title open --kak-script %{edit %opt{popup_output}} -- fzf

依赖关系

~8–18MB
~257K SLoC