Lokyr
Documentation

Windows and tabs

On this page

macOS · on by default · the tabs plugin · [window], [plugins.tabs], [app] restore-windows, [sessions]

Open as many windows as you need, each with its own tabs, and move between them from the keyboard. Drag tabs to reorder them, to move them to another window or to split a pane, give them titles and colors of your own, and have your windows open again where you left them.

Try it

Press ⌘T: the tab bar shows two tabs, the new one in front. Press ⌘1 to show the first tab again. Then drag the second tab out of the window and let go over the desktop: it opens in a window of its own, whose titlebar shows ⌥⌘2 at its right. Press ⌥⌘1: the first window comes forward.

What it gives you

Open and close windows

Press ⌘N, or choose Shell › New Window, to open a window. Its shell starts in the folder of the window you were in, as new-directory says. The first window opens where you last moved or resized one, as remember-frame says, and later windows open a little down and to the right of the one you're in.

Press ⇧⌘W, or choose Shell › Close Window, to close the window with all its tabs. Lokyr asks first while a program other than a shell runs in it, such as vim or a build, because closing the window ends that program.

A pane closes when its shell exits, such as after exit, as close-on-exit says. A tab closes with its last pane, and a window with its last tab. Lokyr stays open without windows, like other Mac apps: click its icon in the Dock, or press ⌘N, to open one. Set quit-after-last-window-closed to true to quit Lokyr instead.

Try it: press ⌘N, then run exit in the new window: the window closes, and the first one comes forward.

Move between windows

Each window takes a number when it opens, the lowest that no other open window of its session has, and shows its keys at the right of its titlebar, such as ⌥⌘2.

title-shortcut hides the keys in the titlebar.

Try it: press ⌘N: the new window's titlebar shows ⌥⌘2. Press ⌥⌘1: the first window comes forward.

Use sessions

A session is a group of windows, such as one for each project. One session shows at a time: when you switch, its windows come back where you left them, and the others hide, their programs running. Window › Sessions › New Session opens one, ⌃⌘S switches to a session or opens one in a project's folder, and ⌃⌘L switches to the session you used before. Sessions covers them. · Since 1.5

Float a window or use full screen

Choose Window › Float on Top to keep the window above other apps' windows, such as while you follow a build beside your browser. Choose it again to let the window go back among the others. Each window floats on its own.

Click the window's green button, or choose View › Enter Full Screen, to use full screen. The tab bar stays at the screen's top, and the menu bar slides down over it when the pointer reaches the top. A floating window stops floating in full screen, and floats again when it leaves it.

Try it: choose Window › Float on Top, then click a window of another app: the Lokyr window stays above it.

See through a window

Give the window's background an opacity below 1 to see what's behind it, and blur what shows through:

[window]
background-opacity = 0.85   # 0 is clear, 1 is opaque
background-blur = 20        # the blur's radius, in points

Only the background lets things show through: the text, the cursor, the selection and the colors that programs give stay opaque. A blur costs the window server some work: over a video that plays behind the window, a blur of 20 points took about 4 % more of one core. background-opacity and background-blur tell more.

Press ⌘U, or choose View › Use Transparency, to show a translucent window opaque while you read, and again to see through it once more. Each window keeps its own choice, and your config stays as it is. · Since 1.3

Try it: add the lines above to your config file, which Lokyr › Settings… (⌘,) opens, and save it: the window shows what's behind it, blurred.

Open your windows again when Lokyr starts

Lokyr can open the windows that were open when you quit it: each where it was, with its tabs in their order, their titles and colors, their splits, and each pane in its folder. [app] restore-windows decides whether it does:

[app]
restore-windows = "always"   # open the last windows again at every start

Each pane starts a new shell, in the folder where its shell was. The programs that ran in the panes don't come back. With [app] restore-scrollback set to true, what they showed does: each pane shows its scrollback again, its colors, links and commands too, up to the prompt where you typed, then a line that tells when it was kept, then the new shell's prompt. The gutter's marks, the blocks and the jumps between prompts work on the restored commands. Lokyr keeps all that a pane held within its [scrollback] limit, in a file of each pane that only your account can read, and removes it once the pane shows it again. It's off by default, as what the panes showed may hold what you wouldn't keep, such as a token that a command printed. · Since 1.5

[app]
restore-scrollback = true    # the panes show again what they showed

What a program showed on its own screen, such as vim or less, isn't kept: the pane shows what the shell had printed before it. Images aren't kept either.

Pinned tabs come back pinned, and groups come back with their names, colors and folds. · Since 1.3

Sessions come back too, with their names, the one you used last showing. The windows of the other sessions open the first time you switch to each, their shells starting then, so Lokyr starts as fast as it does with the windows that show. A session you don't switch to keeps its windows, and their scrollback, for the next start. · Since 1.5

Try it: set restore-windows = "always" and restore-scrollback = true, open a second tab with ⌘T, and run cd /usr/share and ls in it. Quit Lokyr with ⌘Q, then open it again: the window opens with both tabs, the second one in /usr/share, its ls and the files it listed above the new prompt.

Open and close tabs

Press ⌘T, choose Shell › New Tab, or click the + at the bar's end to open a tab after the others. Its shell starts in the folder of the pane you were in, which your shell reports with shell integration.

Press ⌘W, or choose Shell › Close Tab, to close the tab, or only the pane you're in while the tab has splits or floating panes, hidden ones too. You can also middle-click a tab, or click the close button that shows when you point at it. Lokyr asks first while a program other than a shell runs there. Close Other Tabs, in a tab's context menu, closes the window's other tabs.

While a window has a single tab, the bar hides, and the titlebar shows the tab's title and marks. Set hide-when-single to false to keep the bar.

Try it: press ⌘T twice: the bar shows three tabs. Press ⌘W twice: the bar hides again, and the titlebar shows the first tab's title.

Move between tabs

Try it: with three tabs, press ⌘1, then ⇧⌘]: the second tab shows. Press ⇧⌘→: it moves to the third place.

Drag tabs

Drag a tab along the bar to put it elsewhere in the bar: the other tabs slide out of its way. Drag it out of the bar, and a picture of the tab and its panes follows the pointer. Where you let go decides what happens:

Press Escape during a drag to put the tab back where it was.

Try it: with two tabs, drag the second tab down onto the right half of the pane, and let go when that half lights up: the pane splits, with the second tab's shell on the right.

Name and color tabs

A tab shows the title that its program sets, such as vim or your prompt, or else its folder and the program that runs in it, such as src — vim. A title set by a program other than the shell goes when the shell is back in front, such as when ssh ends.

Try it: open a second tab with ⌘T, and run this command in it, which colors the tab red, as a program would:

printf '\033]6;1;bg;red;brightness;220\033\\'

The tab turns red. Run this command to take the program's color away:

printf '\033]6;1;bg;*;default\033\\'

Pin tabs

Platforms: macOS · Since 1.3

Right-click a tab and choose Pin Tab, or choose Shell › Pin Tab, to keep it at the start of the bar. In a bar across the window, a pinned tab is narrow: it shows a pin, the first letters of its title and its most urgent mark, such as an agent that waits for you, and its whole title when you point at it. Down a column, it shows a pin instead of its close button.

⌘W doesn't close a pinned tab, nor does Close Other Tabs, but ⌘W still closes one of its panes when it has several. Right-click it and choose Unpin Tab to let it go.

Try it: with two tabs, right-click the second and choose Pin Tab: it moves to the start of the bar and narrows. Press ⌘W while it shows: it stays.

Reopen a closed tab

Platforms: macOS · Since 1.3

Press ⇧⌘T, or choose Shell › Reopen Closed Tab, to bring back the tab you closed last, at its place and as you left it. Press it again for the one before. When its window closed, or belongs to a session that's hidden, the tab comes back in the window in front.

For 10 seconds after you close a tab, its programs keep running and what they print is kept; then the tab closes for good. A closed tab keeps its memory while it waits. reopen-seconds sets how long it waits, and 0 closes tabs at once.

Some tabs close for good at once:

Try it: open a tab with ⌘T, run ls, and close the tab with ⌘W. Press ⇧⌘T within 10 seconds: the tab comes back, with the listing.

Group tabs

Platforms: macOS · Since 1.3

Right-click a tab, choose New Group with Tab, and type the group's name. The group shows as a pill of its name and color before its tabs, which take a tint of its color.

Down a column, a group is a row of its color's dot and its name.

Try it: with three tabs, right-click the first, choose New Group with Tab and type build. Drag the third tab right after the first: both are in the group. Click the pill: the group folds.

Choose where the bar goes

position puts the bar at the top or the bottom of the window, or in a column on the left or the right. style chooses its look:

On the left, in the unified and seamless looks, the column runs up through the titlebar, like a sidebar of macOS. Drag a column's edge to change its width.

[plugins.tabs]
position = "left"
style = "seamless"

Try it: with two tabs open, add these lines to your config file and save it: the tabs move to a column on the left.

Split a tab into cards

Press ⌘D, or choose Shell › Split › Split Right, to split the pane in two: each pane of the tab shows as a card of rounded corners, and the gap between two cards is the divider that you drag. A card's header shows its program's icon, such as Rust's while cargo runs or Claude's while Claude Code does, its title and its folder, such as ~/…/lokyr. The card with the keyboard stands out, with buttons that split it right or down, zoom it, list its other actions and close it. A click on another card's header gives it the keyboard. · Since 1.7

[plugins.splits] look = "plain" shows the panes edge to edge, as before, and icons gives programs icons of your own. The splits plugin covers both. · Since 1.7

Try it: press ⌘D and run top in the new pane: its card's header shows a monitor's pulse and the program's title. Click the other card's header to give it the keyboard.

Float panes over a tab

Choose Shell › New Floating Pane, or press ⇧⌥⌘F, to open a pane that floats over the tab's splits, in a box with its title at the top; drag its title to move it and its edges to resize it. Shell › Show or Hide Floating Panes, ⌥⌘F, hides the tab's floating panes together and shows them again. A popup is a floating pane in the middle of the tab that runs a command of your keys, such as lazygit, and closes when it ends. Floating panes and popups covers them. · Since 1.5

A floating pane shows as a card too, with the same header as a split pane's card and a × that closes it. · Since 1.7

Try it: press ⇧⌥⌘F and run top. Press ⌥⌘F to hide it and ⌥⌘F again to see it still running.

Type into several panes at once

Choose Shell › Broadcast Input › To the Tab's Panes, or press ⌥⌘I, and what you type into the pane with the keyboard goes to every pane of the tab too: your keys, the text of an input method, and what you paste with ⌘V or drop. Each pane takes it as its own program asks, such as with bracketed paste in one and without it in another. A red ring marks each pane that takes it, and a megaphone marks the tab. · Since 1.5

The ring's color is the theme's broadcast.ring, red by default.

Try it: split a tab with ⌘D, press ⌥⌘I, and type uname -n: both panes run it. Press ⌥⌘I again to type into one pane.

Settings

[window]
columns = 100                     # a new window's width, in cells
rows = 30                         # and its height
remember-frame = true             # the first window opens where you left one
title-shortcut = true             # the window's keys, such as ⌥⌘1, in its titlebar

[app]
restore-windows = "system"        # "always" opens your last windows again
restore-scrollback = false        # true: their panes show what they showed
quit-after-last-window-closed = false

[plugins.tabs]
position = "top"                  # "bottom", "left" or "right"
style = "unified"                 # "standard" or "seamless"
hide-when-single = true           # a single tab hides the bar
close-button = "hover"            # "always" or "never"

[window], [app] and [plugins.tabs] tell every key, control-tab and reopen-seconds among them.

Commands and keys

KeysIn the configWhat they do
⌘Ncmd+nOpen a window
⇧⌘Wcmd+shift+wClose the window
⌥⌘1 to ⌥⌘9cmd+alt+1 to cmd+alt+9Bring that window forward
⌘`, ⇧⌘`cmd+`, cmd+shift+`Bring the next or the previous window forward
⇧⌘Icmd+shift+iGive the window a title
⌃⌘Scmd+ctrl+sSwitch to a session, or open one in a folder · Since 1.5
⌃⌘Lcmd+ctrl+lSwitch to the session you used before · Since 1.5
⌥⌘Icmd+alt+iSend what you type to every pane of the tab, or to one pane again · Since 1.5
⇧⌥⌘Icmd+alt+shift+iSend what you type to every pane of the window, or to one pane again · Since 1.5
⇧⌥⌘Fcmd+alt+shift+fFloat a new pane over the tab · Since 1.5
⌥⌘Fcmd+alt+fShow or hide the tab's floating panes · Since 1.5
⌘Tcmd+tOpen a tab
⌘Wcmd+wClose the tab, or the pane while the tab has splits or floating panes
⌘1 to ⌘9cmd+1 to cmd+9Show that tab
⇧⌘], ⇧⌘[cmd+shift+], cmd+shift+[Show the next or the previous tab
⌃Tab, ⌃⇧Tabctrl+tab, ctrl+shift+tabShow the tab you used before, or go the other way · Since 1.3
⇧⌘←, ⇧⌘→cmd+shift+left, cmd+shift+rightMove the tab a place
⇧⌘Tcmd+shift+tReopen the tab you closed last · Since 1.3
⌘Ucmd+uShow the window opaque, or translucent again · Since 1.3

The commands' reference lists every command of the windows and the tabs, those of no keys too, such as tabs.toggle-pin and window.toggle-float-on-top, which you can bind in [keys].

Limits

Troubleshooting

The tab bar doesn't show

Why: the window has a single tab, which hides the bar by default, or the tabs plugin is turned off.

Fix: press ⌘T to open a second tab, or keep the bar for a single tab too:

[plugins.tabs]
hide-when-single = false

Check: the bar shows the window's tab. If ⌘T opens no tab, remove enabled = false from your config's [plugins.tabs].

Your windows don't open again when Lokyr starts

Why: restore-windows follows macOS's Close windows when quitting an application, which is on by default.

Fix: set restore-windows = "always" in your config's [app], or turn that setting off in System Settings › Desktop & Dock.

Check: quit Lokyr with two windows open, then open it again: both windows open.

New tabs open in your home folder

Why: your shell doesn't report its folder, which Lokyr learns from shell integration.

Fix: see Shell integration.

See also