Lokyr
Documentation

Floating panes and popups

On this page

macOS · Since 1.5 · [keys], [app] restore-scrollback

A floating pane floats over a tab's splits, in a box with its title at the top, such as a scratch shell that you show and hide with a key. A popup is a floating pane in the middle of the tab that runs one command, such as lazygit or fzf, and closes when the command ends.

Try it

Press ⇧⌥⌘F and run top. Press ⌥⌘F to hide it, and ⌥⌘F again: top is still running. Drag the box by its title, then drag one of its corners to resize it.

Then bind a popup. Add this to your config and save it:

[keys]
"ctrl+cmd+o" = { command = "pane.popup", args = { command = "fzf", width = 0.6, height = 0.5 } }

Press ⌃⌘O: fzf opens in the middle of the tab. Press Escape: the popup closes.

What it gives you

Open, show and hide floating panes

Move, resize and close a floating pane

Move a pane between the splits and the floating panes

Run a command in a popup

Bind pane.popup to a key in the config's [keys], with the command to run:

[keys]
"ctrl+cmd+g" = { command = "pane.popup", args = { command = "lazygit" } }
"ctrl+cmd+o" = { command = "pane.popup", args = { command = "fzf | xargs open", width = 0.6, height = 0.5 } }
"ctrl+cmd+n" = { command = "pane.popup", args = { command = "vim notes.md", folder = "~/notes" } }

You can move, resize and close a popup as any floating pane. A popup stays over its tab: it doesn't go into the splits, to another tab or to a window, and when the tab's last split pane closes, the popup closes with the tab.

Popups from plugins

A plugin can open a popup too, such as a Git client in the folder you're in, and learn how its command ended. It needs two capabilities: workspace-write, as it opens a pane, and pty-write, as it runs a command there. Lokyr asks you for both when the plugin first runs. The plugin reference covers cx.open_popup and the popup-closed event.

Settings

[keys]
"ctrl+cmd+g" = { command = "pane.popup", args = { command = "lazygit" } }

[app]
restore-windows = "always"     # your floating panes come back with their tabs
restore-scrollback = true      # with what they showed when you quit

Commands and keys

CommandTitleArgumentsDefault keys
pane.new-floatingNew Floating Pane⇧⌥⌘F
pane.toggle-floatingShow or Hide Floating Panes⌥⌘F
pane.floatFloat Pane
pane.move-into-splitsMove Pane into Splits
pane.popupOpen Popupcommand, text; folder, text; width, number; height, number

Float Pane and Move Pane into Splits are in a pane's context menu alone. The commands' reference lists them with the other commands of the panes.

How it works

Limits

See also