Configuration

The window's behavior is configured in code: an init.lua, as Neovim's is, written in Luau, a fast dialect of Lua with optional types and a sandbox. Without one, the window works as it always does. Settings needed before the window starts, such as the graphics API, stay in startup.toml, beside it. The font is both: startup.toml's is what the window starts in, and init.lua's outdoes it.

-- ~/.config/clackatoo/client/init.lua

-- tmux's split keys, as well as clackatoo's own.
client.keys.map("niv", '<C-b>"', function(ev) ev.pane:split("below") end)
client.keys.map("niv", "<C-b>%", function(ev) ev.pane:split("right") end)

-- Closing a pane takes :close, not a key.
client.keys.unmap("niv", "<C-b>x")

-- The list of background tabs on Ctrl+B Space, rather than Ctrl+B b l.
client.keys.unmap("niv", "<C-b>bl")
client.keys.map("niv", "<C-b><Space>", function() client.cmd("Background") end,
  {desc = "background tabs"})

-- x in normal mode closes a chat, and does what it always did elsewhere.
client.keys.map("n", "x", function(ev)
  if ev.pane.kind ~= "chat" then return ev:propagate() end
  ev.pane:close()
end)

Where it goes #

~/.config/clackatoo/        or $XDG_CONFIG_HOME/clackatoo/
  client/settings.lua       what :setpersist, :mappersist and :Settings saved, run before init.lua
  client/init.lua           the window's config
  client/lua/               modules for it to require
  client/startup.toml       the window's settings, needed before it starts
  daemon/settings.lua       the daemon's settings clackatoo saved, run before its init.lua
  daemon/init.lua           the daemon's config: its agents, this machine, the web app
  daemon/lua/               modules for it to require
  lua/                      modules shared by the window's config and the daemon's

require("theme") loads theme.lua from client/lua/, or else lua/, or theme/init.lua from either. A dot in a name is a directory: require("keys.tmux") is keys/tmux.lua. A name is letters, digits, _ and -, never a path, so nothing outside those folders is required, and a module is read only as text, up to 1 MiB, never Luau's bytecode. Each module runs once, and later requires get what it returned.

Windows #

The config runs once for the client, the process that opens clackatoo's windows, not once for each window. Its bindings, handlers and options apply in every window, and a window opened later goes by them as they are, without the config running again, so state a config or a module keeps, such as a count, is kept once. It runs on a thread of its own, alongside the first window starting up, and a typical config takes under a millisecond. The window never waits for it to show itself: keys pressed before it has run do what they do without it.

Each window is an object in it. client.windows lists them, and an event says which window it happened in, as ev.window. A pane, tab or workspace is always one window's, the one it was found through: two windows can be on two machines' daemons, whose panes are numbered apart. So ev.pane:split("right") splits in the window whose key it was, and client.cmd runs its command there; while the config loads, in no window's handler, it runs in the window with the focus.

A window opened in a process of its own, as with CLACKATOO_WINDOW_HOST=off, or one that couldn't share the others' process, as with another graphics API, runs the config for itself.

:reload runs the config again, from the start, for every window: settings.lua, then init.lua. Everything the old config bound or listened for goes, the window's own keys come back first, and options go back to how they start, including those changed with :set and :setlocal.

You rarely need it: the windows watch settings.lua, init.lua and the modules they require, and a quarter of a second after one is saved with something new in it, they run the config again as :reload does, and the bar says so. What the settings menu or :setpersist saves in settings.lua isn't a change to run it again for: the windows go by it already. A module the config doesn't require yet is picked up once the file that requires it changes. If the user's inotify instances are all in use, nothing's watched, which the window's log says, and :reload still works.

A config run again by itself, as its files changed, applies only its plain options. It runs beside the config the windows go by, which keeps its keys, handlers and all it does, and only the options it sets are taken: not keys it binds, handlers, client.cmd, client.connect, client.forward or splits, and not the options that start programs, reach the network or loosen what agents may do (agent, agenttools, claudetask, chatbrowser, rewindfiles, languageinstall, osc52 and updatecheck). The bar says what it held back, as the config changed: its options are as it says; :reload turns on what's held: agenttools=allow, client.cmd(bg make), 2 key maps, 1 handler, so you see what :reload would turn on before you run it. Running it is your OK: an agent's keys can't, and neither they nor a chat with Control of the window can set those options, with :set or in the settings menu.

A window opening runs its whole config, as Vim runs your init.vim: it's yours, and what you started the window with. Only a change to it as the window runs is held back. So a file an agent writes never runs anything by itself, until you open a window or :reload; see What this guards against.

How a key travels #

Each key you press goes through, in order:

  1. Keypress handlers, added with on("keypress", …), in the order they were added. A handler on a pane only hears keys pressed in that pane.
  2. Bindings, the window's own and those made with client.keys.map.
  3. The pane: the program in a terminal, the box in a chat, or the pane's normal mode.

A handler lets the key go on unless it calls ev:stop(), which ends its journey there. A binding stops its keys unless it calls ev:propagate(), which lets them go on to the pane, as if they weren't bound. If the binding took several keys, such as <C-b>x, they all go on, in order.

Whether a key goes on is decided when the handler finishes, or first waits for something, as pane:split waits for the new pane. Calling stop or propagate after that is a mistake. A key waits at most 300 milliseconds for the config to decide. After that, it's as if the config had done nothing more: a binding's keys stop there, and a key a handler heard goes on.

A binding made with {propagate = true} decides at once, without the config: its keys go on to the pane as soon as they're pressed, as if it had called ev:propagate(), and its function runs after, so a slow one never holds them up. Calling ev:stop() in it is a mistake.

-- u undoes at once, as it always does, and the config notes it after.
client.keys.map("n", "u", function(ev)
  print(`undid something in a {ev.pane.kind}`)
end, {propagate = true})

How handlers are run #

One config runs for every window, on one thread, so its handlers take turns. The handlers a key waits for, those of on("keypress") and a binding's function, run first, each until it finishes or first waits. Everything else is background work: a handler going on once what it waited for has come, a handler of an event nothing waits on, such as a chat's turn ending, and a binding with propagate. Background work runs a slice of a couple of milliseconds at a time, in turn, and a key that comes meanwhile is decided first, so a busy handler in one window never holds up keys in another: a key waits a fraction of a millisecond for it. A binding with propagate pressed again before its function has started runs it once, for the latest keys. At most 64 handlers wait their turn; past that, a new one is left out, and the bottom bar says so.

A handler that calls coroutine.yield() itself lets other work go first, and goes on after. A coroutine of its own, made with coroutine.create or coroutine.wrap, is never ended for a slice: it runs on until it yields to the handler, which is then. Nor can Luau end one inside a metamethod, or a function called from C, such as table.sort's comparator; there it runs on.

Keys #

client.keys.map(modes, keys, function) binds keys in one or more modes, replacing what they were bound to. client.keys.unmap(modes, keys) takes a binding away, the window's own included.

A binding can say what it does, as Neovim's vim.keymap.set takes it: client.keys.map("n", "<Space>ft", function() client.cmd("Files") end, {desc = "find todos"}). The panel of keys shows it in place of "from your config". {propagate = true} lets its keys go on at once and runs the function after (see how a key travels). Neovim's silent, noremap, nowait, unique, and remap = false are taken and change nothing; any other option is left out, with a warning in the bar, and the binding is still made. client.keys.group(modes, keys, name) names the keys that start several, as which-key.nvim's groups do: client.keys.group("n", "<Space>f", "my files") makes Space's panel say f +my files. A group with no name stops naming them. Keys that finish a binding of their own say what that does instead.

Keys can be bound to other keys too, given as a string, as Vim's noremap maps them: client.keys.map("n", "gi", "gri") makes gi go to implementations, and client.keys.map("n", "<Space>w", ":w<CR>") writes the file. The keys are typed as if pressed, so the window's own keys do what they do, but the config's bindings and keypress handlers don't see them, so a binding can't set off itself or another of the config's. They're typed after any keys typed before them: a mapping to @qx types q's keys and then x, and a key among them that fails stops the rest, as in Vim.

Modes are written as letters, together: "niv" is all three of normal, insert and visual. c is typing into a pane's prompt, such as a search.

Keys are written as in Vim. A character is itself, and <…> holds a key with modifiers or a named key:

WrittenIs
<C-b>, <A-h>Ctrl+B, Alt+H. <M-h> is <A-h>.
<C-O>, <C-S-o>Ctrl+Shift+O. Shift is part of a letter: <C-o> is Ctrl+O.
<S-Tab>Shift with a named key
<Esc>, <CR>, <Tab>, <BS>, <Del>, <Insert>, <Space>Named keys. <Enter> and <Return> are <CR>, and <Escape> is <Esc>.
<Up>, <Down>, <Left>, <Right>, <Home>, <End>, <PageUp>, <PageDown>, <F1>–<F12>More named keys
<lt><

Several keys in a row, such as <C-b>", make a sequence. A key that starts one waits for the rest as long as it takes, as tmux's prefix does. If the next key goes on to no binding, the keys typed so far go to the pane as if nothing were bound to them, as Vim's do, so binding gi leaves gg as it was, and the next key is looked up on its own. Keys that began with Ctrl or Alt held, as <C-b> does, are the window's, and are dropped instead. A binding whose keys start a longer binding's, such as <C-b> beside <C-b>x, can't be reached.

client.cmd(line) runs a command, as if typed after :, so a key can do anything a command can. To find files with <Space>ff rather than <Space>pf:

client.keys.unmap("nv", "<Space>pf")
client.keys.map("n", "<Space>ff", function() client.cmd("Files") end)

client.cmd("reload") is refused: the config can't run itself again.

client.forward(spec) forwards a port as :portforward does, client.forward(8080) or client.forward("3000:8080"), in every window on another machine, those opened later included. A window on this machine passes it over silently; a spec it can't read is an error.

client.connect(host) has the daemon bring another machine's workspaces in, as :connect HOST does. Every window asks its own daemon, those opened later included, and asks again whenever it connects, saying nothing unless it fails; the daemon keeps its connections, so windows on the same one asking again leave it as it is. client.disconnect(host) ends that connection. client.connect("server", {share = false}) keeps that machine from the daemons connected to this one, as :connect HOST --no-share does.

Options #

Options are settings, as Vim's are, read and set by name through client.opt, as through Neovim's vim.opt:

client.opt.relativenumber = false   -- absolute line numbers only
client.opt.numberwidth = 5
client.opt.colorcolumn = { 80, 120 }
print(client.opt.number)            -- true
print(client.opt.cc[1])             -- 80

A list, such as colorcolumn, reads as a table of numbers, and is set with one, with a string as :set writes it, such as "80,120", or with a number for a list of one. "" or {} sets none. Text, such as showbreak, is a string. A number can have a fraction where the option takes one, client.opt.fontsize = 10.5, and a number can be set as a string, as :set writes it.

An option has one value every window shares, as Vim's global options have: client.opt, :set and :setpersist change it for every window at once. A few can also be set for one window alone, with :setlocal.

:set changes them as you go, as in Vim, and a config reads what it sets:

WrittenDoes
:set number, :set nonumberTurns an option on or off.
:set number!, :set invnumberTurns it over.
:set number?Shows it in the bottom bar. The name alone does too, for an option that isn't on or off.
:set numberwidth=5Sets a number.
:set colorcolumn=80,120Sets a list, with commas between its numbers. :set cc= sets none.
:set showbreak=↪\ Sets text; \ is a space and \\ a backslash.
:set number&Puts it back as it starts.
:setShows the options changed from how they start.
:verbose set number?Shows it, and where it was set.

Several can go after one :set, such as :set nu rnu. Each option has a short name, as in Vim, which works everywhere the long one does.

Font #

OptionShortIsStarts
fontgfnThe font family terminals and editors are drawn in, as fc-list : family names it, such as JetBrains Mono. Empty is your system's monospace font. A family that isn't installed is refused, and the font stays as it was. --font or CLACKATOO_FONT outdoes what init.lua sets as it runs, but not :set or what your keys set afterward.your system's
fontsizefszThe size text is drawn at, in points, from 4 to 200, such as 12 or 10.5. The window keeps its size, and the panes fit as many cells as now fit, as when it's resized. --font-size or CLACKATOO_FONT_SIZE outdoes what init.lua sets as it runs.12

Editors #

OptionShortIsStarts
numbernuLine numbers down an editor's left, the cursor's line showing its own.on
relativenumberrnuThe other lines show how far they are from the cursor's, for counts such as 5j. Without number, the cursor's line shows 0.on
numberwidthnuwThe fewest columns the line numbers take, with the space after them, from 1 to 20.4
cursorlineculThe cursor's line is lit faintly across an editor, so the eye finds it.on
colorcolumnccColumns marked down an editor, such as 80, to keep lines short by. A list, counting from 1, as the bottom bar's column does, up to 9999.none
virtualtextvtWhat a language server says is wrong with a line, written dimly after its end: the worst, if there are several.on
gitsignsgsThe column of git signs left of the line numbers. While it's on, it's there for every file, so the text doesn't move when the first change comes.on
agentsignsasA column right of git's signs marking the lines an agent changed that you haven't reviewed, in the chat's color. It shows only while a file has such lines, or :blame is on.on
wrapwrapA line too long for an editor's pane goes on over as many rows as it needs. Off, the view scrolls sideways to follow the cursor.on
linebreaklbrWrapped lines break between words, not in them.on
breakindentbriWrapped rows start as far in as their line is indented.on
showbreaksbrText drawn at the start of each wrapped row.none
scrolloffsoThe fewest lines kept in view above and below an editor's cursor. Half the pane or more keeps the cursor's line in the middle.5
markdownviewmdvHow a Markdown file opens in an editor: as its text, raw, or rendered, as prose, rendered. :markdown and <Space>tm turn each editor from one to the other.raw

Editing #

OptionShortIsStarts
tabstoptsHow wide a tab is drawn: to the next column that's a multiple of it, from 1 to 32.4
shiftwidthswThe columns >> and << indent by, as does Tab where it indents with spaces, up to 32. 0 means tabstop's, so the two can't drift apart.0
expandtabetIndents with spaces, not tabs, where no line nearby is indented yet. A file keeps the kind of indent it has.on
smartindentsiA new line, and one where }, ] or ) is typed first or : ends else and the like, is indented as its language's tree-sitter rules say, not Vim's rules for C, a moment after it's given the line before's indent. Off, it keeps the line before's. = indents by the rules either way.on
autoreadarA file changed on disk by something other than an agent is read again if it has no changes not written, as an edit u undoes. Off, or with changes, the bottom bar says so.on
formatonsavefos:w formats the file first, as its language server does, then writes it. If the server can't format, or takes over 3 seconds, the file is written as it is, and the bottom bar says why.off
tildeoptop~ takes a motion, as g~ does.off
startoflinesolThese go to the line's first character that isn't blank, as Vim's do: gg, G and Ctrl+Home, H, M and L, Ctrl+D, Ctrl+U, Ctrl+F, Page Down and Page Up, in editors and terminals; and in an editor, : and a line number, and deleting, shifting or indenting whole lines (dd, dj, dG, >>, <<, ==, and their kin). Off, as Neovim's are, they keep the column, as j and k do. Yanks and Ctrl+E and Ctrl+Y keep it either way, and :d goes to the first non-blank either way.off

Searching #

OptionShortIsStarts
ignorecaseicSearches ignore case, in editors, in a terminal's normal mode, in a chat's and in lists'. An editor ignores the case of plain English letters only: é doesn't match É.on
smartcasescsWith ignorecase, a search with a capital letter in it matches case, in editors, terminals, chats and lists. Does nothing without ignorecase, as in Vim.on
hlsearchhlsEvery match of the last search in view is lit up, in editors, in a terminal's normal mode, in chats and in lists, the one the search went to brighter than the rest, as Neovim's are: after /, ?, n and N, and in editors *, #, :s and :g too, until Esc or :nohlsearch. Off, only the match the search went to is lit.on
incsearchisWhile / or ? is typed, in editors, a terminal's normal mode, chats and lists (explorers, boards, and reviews), the cursor and the view go to the match the search would go to from where it started, and its matches are lit, as Neovim's are. Esc puts them back; Enter keeps them, and is the search. Off, nothing moves until Enter.on
inccommandicmShows what :s would do while it's typed: nosplit, in place, or none.nosplit
hintpatternhpatA regular expression whose matches hints label too, as CLACKA-\d+. One that can't be read is said in the bar as hints start.none

Completion and language servers #

OptionShortIsStarts
completioncmpAsks the language server what could finish a word as you type it. Off, Ctrl+Space, Ctrl+N, and Ctrl+P still ask.on
completedelaycmpdHow long typing pauses, up to 2000 milliseconds, before completion asks, so a burst of keys asks once. 0 asks at every key.40
completeacceptcmpaWhat Enter does with the menu open: accept the item you moved to (picked), always accept (enter), or never (ctrl-y), leaving it to Ctrl+Y.picked
completetabcmptTab accepts the picked item too.off
signaturehelpsigShows the signature of the call you're typing the arguments of.on
highlightuseshluLights the other uses of the name the cursor rests on, as the language server says; where it's given a value a little brighter.on
inlayhintsihWrites what the language server says between the code: names' types and arguments' parameter names, dim, never part of the text. <Space>th toggles it.on
languageinstallliWhat happens when a file is opened in a language, or with a language server, that isn't installed but can be: ask in the bottom bar, install it always without asking, or never offer.ask

The clipboard #

OptionShortIsStarts
clipboardcbWhich of the desktop's the unnamed register goes along with, for what's yanked or deleted in an editor and yanked in a terminal or a chat: the clipboard (unnamedplus), the primary selection (unnamed), or neither (none), keeping it the window's own but for "+ and "*.unnamedplus
osc52osc52What programs in a terminal can do with the clipboard through OSC 52: copy, paste, copy-paste, or off. What they copy goes to "+ and "* too. Reading is off unless allowed, since whatever runs in the terminal would get the clipboard. Only the window that last typed into the terminal acts, and text is capped at 1 MiB.copy
pasteimagepiHow Ctrl+Shift+Alt+V pastes an image into a terminal: path, kept in a file on the terminal's machine whose path is pasted, or clipboard, put on that machine's clipboard and Ctrl+V typed, which needs a desktop session there. A chat attaches the image either way.path

Terminals #

OptionShortIsStarts
blockmarksbmWhich finished commands a terminal marks at the end of their prompt's line, where the shell says how they ended: those that failed, with a red ✗ and their exit status (failed), every one, with a faint ✓ for those that worked (all), or none (none).failed
predictechopeShows what's typed in a terminal at once, underlined, before its echo comes back: auto for a daemon on another machine whose round trip is over 30 ms or has stalled moments before, always, or never.auto

Agents #

OptionShortIsStarts
agentagThe agent :Agent and Ctrl+B a open a chat with: claude, codex, gemini, or one the daemon's config adds. Empty leaves it to the daemon.claude
agenttoolsagtWhat a new chat's agent can do with clackatoo's tools: ask before running commands or typing, allow commands in its own terminals, or off.ask
claudetaskctA new Claude Code chat keeps Claude Code's own Task tool, which runs helpers inside one turn, folded under the Task's card. Off, Claude hands work on only as subagents, which you can watch. Other agents have no such tool.off
chatbrowsercbrA new chat starts with its Browser setting on, so its agent can drive a headless browser with a profile of its own. Off, a chat has none until you turn it on in its settings.off
chatcostchcUnder each chat turn, what it spent, its tokens and, where the agent says, its cost; and what the session cost, in the chat's usage detail (see what else a turn says).on
carryovercoAbout the most of a chat's conversation, in tokens, that an agent the chat moves to hears, from 1000 to 50000, but never more than a quarter of its context.20000
notifyntfWhich chats you can't see get a desktop notification: all (those that finish, fail, or ask something), questions, or off. A program's own notifications show unless it's off.all
rewindfilesrwfWhat rewinding a chat, or switching its branch, does to the files the turns it takes out changed: ask each time, undo them, or keep them. :rewind! undoes them without asking.ask

The window #

OptionShortIsStarts
smoothscrollsmsEase mouse-wheel scrolling in native panes, and all scrolling in the settings menu. Trackpad pixels stay direct; keyboard motions and jumps in panes stay immediate.on
whichkeydelaywkdHow long, up to 5000 milliseconds, keys that start others, as Space does, wait before a panel lists what can come next, so keys typed quickly never flash it. Keys held with Ctrl or Alt, as Ctrl+B, show it at once; 0 shows it at once for every key.400
imeimeType through the desktop's input method, as Chinese, Japanese and Korean are typed and as an emoji picker sends its emoji, while keys type text. Off, keys go straight to the pane, in case the input method gets in the way.on
explorerwidthewHow wide a file explorer opens, in columns: 0 is 30, or a quarter of the tab if that's narrower; otherwise from 10 to 200.0
explorerhiddenehFile explorers show hidden files when they open.off
updatecheckucLook for a new release at most once a day, a while after the window opens, and say so in the bar. It sends one request to api.github.com, saying the version.on
renderer—The graphics API windows draw with: vulkan, fastest where it works well, or opengl, which on some machines with two GPUs opens a window much sooner. It's read from startup.toml as the window process starts, so :set can't change it: :setpersist renderer=opengl saves it for windows opened after.vulkan
priority—Whether windows run ahead of your other programs (high) or as they do (normal). Read from startup.toml as the window process starts, so only :setpersist changes it, for windows opened after.high

Other machines #

OptionShortIsStarts
showhostshhWhen a workspace from another machine shows its machine after its name, as notes@desk: only while another workspace has the same name (ambiguous), always (always), or never (never).ambiguous
forwardpacefpForwarded ports hold themselves back on a slow link so keys don't wait behind them. Off, they take the whole link. What the daemon sends changes for connections made after it's changed; what the window sends changes at once.on

Setting an option that doesn't exist, or to a value it can't hold, such as client.opt.number = 1, is a mistake. renderer and priority are read only as a window opens, so client.opt reads them but can't set them, and neither can :set.

One window's own: setlocal #

:setlocal, or :setl, sets an option for this window alone, over the value every window shares, as Vim's :setlocal does for its window-local options. It takes what :set takes. These can be set so:

font, fontsize, number, relativenumber, numberwidth, cursorline, colorcolumn, wrap, linebreak, breakindent, showbreak, scrolloff

WrittenDoes
:setlocal nowrapTurns wrapping off in this window, leaving the others as they are.
:setlocal wrap<Takes this window's own value away, so it has every window's again. :set wrap< does too.
:setlocal wrap&Sets this window's own to how it starts.
:setlocalShows this window's own values.
:verbose setlocal wrap?Shows it, and says whether it's this window's own.

:set in a window sets the value every window shares, and takes that window's own value of it away, so it shows what was set; other windows keep theirs. So does setting client.opt in a handler of a key pressed in the window, once the config has loaded. While the config loads, and in a handler of a chat's turn ending, which is every window's, it sets only the value every window shares. :setlocal values aren't saved: :setpersist saves the value every window shares, and a reload takes them away.

The font a window is opened with, --font and --font-size or CLACKATOO_FONT and CLACKATOO_FONT_SIZE, is its own in the same way: the config setting the font as it loads doesn't change it, but :set in that window does. A reload, and :set font&, put it back.

client.opt reads the value every window shares while the config loads, and in a handler of a chat's turn ending; in a handler of a key, it reads the window's the key was pressed in, its own if it has one, as Neovim's vim.o reads the current window's.

Saving options: settings.lua #

:setpersist, or :setp, is :set that also saves what it sets, so it's set again after a :reload, and whenever clackatoo's windows open again. Like :set, it changes every window open at once. It takes what :set takes, and Tab completes the same:

:setp nowrap colorcolumn=80,120

Most options are saved in client/settings.lua, beside init.lua. The font, its size, renderer and priority are saved in startup.toml instead, as the window needs them before any Lua runs, keeping the rest of that file, comments included. :setp number& puts an option back as it starts and takes it out of the file.

clackatoo writes settings.lua, and says so at its top. It holds a line for each option saved, set as your config would set it:

-- Written by clackatoo, whose :setpersist and settings menu change it.
-- Your own config goes in init.lua, which runs after this and outdoes it.

client.opt.wrap = false
client.opt.colorcolumn = { 80, 120 }

It runs before init.lua, so anything init.lua sets outdoes it. An option your init.lua sets as it loads, or a module it requires, isn't saved: :setp sets it for now, and the bottom bar says which line of yours sets it, such as client/init.lua:12 sets wrap, so it's set for now and not saved. Change that line instead, or take it out.

Each save reads the file again and changes only the saved option's line, so saving from one window never undoes what another saved, and everything else stays as it was: blank lines, comments, a comment after a value (client.opt.wrap = false -- too narrow here), and options this build doesn't know, saved by a newer one. An option saved for the first time goes among the options at the end of the file, in the order they're listed here. A block comment, --[[ … ]], is kept whole, so an option commented out in one stays commented out, and saving it adds a line of its own. The file is replaced all at once, never left half written, off the window's thread, keeping its permissions; a new one is readable only by you. If settings.lua or startup.toml is a link, as stow and home-manager make, the file it links to is changed and the link kept; the bottom bar says if its folder can't be written in.

If the file has a line clackatoo didn't write, such as code, or a block comment it can't follow, as one that doesn't end, nothing is saved, and the bottom bar names the line: move it to init.lua. A line settings.lua can't set, such as an option a newer build saved, is said in the bottom bar, and the rest are set all the same.

Where an option was set #

:verbose set shows what last set each option it shows, as Vim's does:

:verbose set wrap? cc? nu?
nowrap · set in client/init.lua:4  colorcolumn=80,120 · saved in client/settings.lua:5  number · as it starts

An option can be as it starts; set as the window opened, by startup.toml or the command line; saved in settings.lua; set in your config as it loaded, with the line, and the line of a module's helper that really set it if that's elsewhere, as client/init.lua:3 (in lua/opts.lua:8); set by your config after it loaded, by a handler or a binding; or set with :set or a key. A :set your config runs, with client.cmd, is your config's, at its line. Your config is loading until each file has run to its end, even one that waits partway, as pane:split waits. An option set in a coroutine of your own, one made with coroutine.create or coroutine.wrap, is said to be set at a line of that coroutine's, as only its lines can be seen from there.

The settings menu #

:Settings opens a menu of your settings over the panes, in one of two modes: Easy, pages of the settings most people change, each with a control, and Advanced, every option and every key bound, as a list to search. :Settings wrap opens it searching for wrap. The cog at the top bar's right, a button's width apart from the window's buttons there, or at the right edge if they're on the left, opens it too, in the mode used last, and closes it again; it's lit while the menu is open.

Easy and Advanced #

The header has the title, one search box, the switch between the two modes and a close button. The menu opens in the mode used last, in any window, and in Easy the first time. m, or a click on the switch, changes mode, keeping what's typed in the search.

Easy groups its pages into General (Appearance, Editor, Terminals, Keys, and Phone & other machines) and Agents (Agents, Specialists, Skills, MCP Servers and Permissions), each with its own icon; in a window too short for them all, the pages down the side scroll to the one shown. The Agents page has separate native-plugin opt-ins for Claude Code and Codex, off by default, and under Servers from the agent's own configuration, whether agents also use the MCP servers of their own settings.

The last four of those list things rather than settings: specialists, skills, MCP servers and permission rules, for the project of the pane that was focused when Settings opened, which each says under its title, with the daemon's machine if it's another. Each has one button by its title, which a presses too, and Enter opens what the keys are on. A specialist, a server and a rule open as a form: only the fields that apply, Save and Cancel along the foot, and what's wrong with a field said under it. In a form every key is the form's: typing on a field starts it, Enter finishes it and goes to the next, Tab and Shift+Tab go between the rows with something to press or type into, Esc stops typing, Ctrl+S saves, and the letters that act elsewhere in the menu do nothing. A button that takes something away asks for a second press, which any other key or click takes back, and Enter in the field before it never goes on to it. A form with changes is never thrown away without asking: Esc, Cancel, the cog, a click off the panel, the keys that go back to normal mode and a :Settings run over it ask first, and do it if asked again. Asking ends typing in a field, so one more Esc is the answer. A reply that comes late from the daemon never replaces or closes a form begun since. A list is read when its page is shown, after anything done on it, and when a lost connection comes back; a page with nothing to list says why. The search finds servers, specialists, skills and rules by name, as well as settings. The foot names the keys that work on the page shown.

A click acts only on a control; on the rest of a row, it takes the keys there. A settings page has rows in cards under small headings: what the setting does in words, a line of help, and its control at the right, drawn as such: a switch, buttons side by side, a slider, a number between − and +, a card for each agent, the font picker or a box to type in. Some controls set several options together: Line numbers is Off, On or Relative, which sets number and relativenumber. Appearance starts with a sample of a terminal's text and an editor's, drawn in your font and size, with line numbers and the cursor's line as set; while the size's slider is dragged, the sample is drawn at the size it's at, and the size is set when it's let go.

Easy shows what's configured, what the menu saves. A setting changed since your config loaded, with :set or a key, says what it is currently under its help. One your init.lua sets as it loads is greyed out, with the place it's set, as init.lua:12, which a click or Enter opens. A change saves at once, and the foot of the menu says what was saved where, as "Saved nonumber norelativenumber in client/settings.lua", one write for the two. u undoes a row's last change, in either mode: a control that set several options undoes them together.

The Keys page lists the keys for what's done most, such as a new tab or a split: Record… records more keys for one, as Advanced's keys section does. Every key, in every mode, is in Advanced.

A page longer than the menu scrolls, by the wheel, a touchpad, or the keys moving to a row out of view, a bar at its right saying where you are; so do Advanced's list and the font picker. With smoothscroll on, as it starts, they glide there, as panes do; off, they jump. A touchpad's own motion is always followed as it comes. Rows part way out of view are cut off at the page's edge, and a click goes to what's drawn where it lands.

Easy leaves out what few change: numberwidth, showbreak, shiftwidth, startofline, tildeop, inccommand, hintpattern, completedelay, completeaccept, carryover, explorerwidth, renderer and priority.

Some rows are the daemon's settings, which the daemon saves in its own daemon/settings.lua: on Terminals, Keep what terminals showed and Lines kept of each terminal after a restart, and Wide emoji; on Agents, the notification When a long command finishes, the Subagents working at once, the native plugins and the servers from the agent's own configuration; on Permissions, Who answers agents' requests; and each switch on Skills. They show once the daemon has said them, so not with a daemon from before them. One your daemon/init.lua sets is greyed out with its place, as your window's init.lua is. One the daemon reads only as it starts says it takes effect at the daemon's next upgrade or restart, lit while a change waits for that. If the daemon's config doesn't run as its files are now, the foot of a page of its settings says why, and the daemon goes by what last ran. In a window whose daemon is on another machine, they're that daemon's, and the header says so, as daemon on desk.

The search finds what Easy has, then what only Advanced has, which says in Advanced: Enter or a click on one switches to Advanced, with it picked. While you type a search, the arrows and letters only type, and Tab or Enter leaves the box. A click off the menu closes it, as Esc does, though the window's edges, top bar and buttons still work. Everything works by the mouse, as it looks, and by the keys:

KeyDoes in Easy
j, k; Down, UpThe next or previous row; on the pages down the side, the next or previous page
Tab, Shift+TabThe next control, on to the next page's first; or the one before, and from the first, the pages
}, {The next page, or the one before
l, h; Right, LeftThe next or previous value: on or off, a choice, a card, or a number by its step; from the pages, l goes into the page
Enter, SpaceChanges the row: turns it on or off, the next choice, opens the font picker, types a value, or records keys; or opens where a locked row is set
/Searches both modes
r, u, oAs in Advanced, below
mSwitches to Advanced, or back
Esc, qClears the search or puts away the font picker, or else closes the menu

Advanced #

Down Advanced's left are its sections: the options' groups, as they're listed here, then Keys, then the daemon's, group by group: This machine, The daemon's agents, Chats agents start, The web app, What terminals keep and The daemon's terminals. Each row is an option and its value, its name in bold if it isn't as it starts; beside the list, the row picked is said in full: its value, its default, what it takes, where its value comes from, as :verbose set says it, and the file it's saved in.

KeyDoes
j, k; Down, UpThe next or previous row
gg, G; Home, EndThe first row or the last
Tab, Shift+Tab; }, {The next section, or the one before
/Searches the names, short names and what each does, as the finder matches; Enter stops typing and keeps what's found
Enter, SpaceChanges the row: turns it on or off, picks the next choice, types a value, picks a font, or records keys
l, h; Right, LeftThe next or previous value: on or off, a choice, or a number up or down
rPuts the option back as it starts, and out of its file
uUndoes the row's last change, one at a time, even after the menu is closed and opened again
xTakes away this window's own value, as :setlocal nu< does
dTakes keys the menu saved out of settings.lua
oOpens the line of config that set the row
mSwitches to Easy
Esc, qClears the search, or else closes the menu

A change applies at once, in every window, as :set does, and is saved where :setpersist saves it: in settings.lua, or for the font, its size, renderer and priority, in startup.toml, which takes effect for windows opened after; the font and its size change in this one too. renderer and priority are only saved, for windows opened after.

The font picker lists the monospace font families installed, those whose font says so or whose letters are all as wide, with the system's monospace font first, and the font in use whatever it is. Tab lists every family, as fc-list : family does, or only the monospace ones again. A value typed, as for colorcolumn or showbreak, is written as :set takes it after =.

Locked. An option your init.lua sets as it loads is locked: it would outdo anything the menu saved, so the menu says where, as init.lua:12 at the row's end, and changes nothing. Enter on it opens that line in an editor beside the focused pane, by the daemon on this machine, where your config is. If the window's daemon is on another machine, the bottom bar says so instead, and nothing opens there.

Configured and current. An option changed since your config loaded, with :set or a key, says both: "configured 4, currently 7", and not saved at the row's end. Changing it in the menu changes what it's configured to as well.

This window's own. An option this window has a value of its own for, from :setlocal, says so at the row's end, and x takes it away.

The daemon's. A daemon option is changed by the daemon: the window asks it, and it saves the option in daemon/settings.lua, changing only that option's line, as the window's settings.lua is changed, then runs its config with it. If the config won't run with it, as daemon.subagents.default more than daemon.subagents.working wouldn't, the file is put back as it was, and the foot of the menu says why. One your daemon/init.lua sets is locked, and Enter opens that line on the daemon's machine. One the daemon reads only as it starts says so beside it, and restart at the row's end while a change waits for its next upgrade or restart; the rest take effect at once, for what the daemon starts from then on. A web device never sees them, and the daemon refuses a change from one.

Keys #

The Keys section lists every key bound, in every mode, those bound alike in several as one row, with what each does and what bound it: as the window starts, settings.lua, or a line of your config. Enter on one records more keys to do the same: press them, then Enter. Backspace takes the last one back, and Esc gives up. They're bound at once, and saved in settings.lua as keys bound to the binding's keys, in the same modes:

client.keys.map("niv", "<A-t>", "<C-b>c", { desc = "new tab" })

Keys your config binds as it loads are locked, as options are, and so are keys it binds to a function, which settings.lua can't hold: bind more keys to those in init.lua. d takes keys the menu saved out of settings.lua, in the row's modes, and puts back what the window binds them to as it starts, if anything; the bottom bar says if settings.lua no longer binds them. A row is keys bound alike in several modes by the same thing, so keys saved for some modes and bound otherwise in others are rows of their own. u after recording keys over ones saved before binds those again.

:mappersist, or :mapp, does the same from the command line: modes, keys, and the keys to type, the rest of the line, as Vim's :map takes them:

:mappersist niv <A-t> <C-b>c

It's refused for keys your init.lua binds as it loads, and the bottom bar names the line.

Bindings in settings.lua go at the end of the file, after its options. Saving one changes only the lines binding its keys, and those only in its modes: a line binding them in the same modes is changed where it is, keeping its comment; a line binding them in other modes too keeps those, as client.keys.map("niv", …) taken out in iv is left "n". So the last line binding the keys in each mode, which is what counts, is always the one saved last.

The menu is the window's own: options are the window process's, not the daemon's, so the web app doesn't list them.

Events and handles #

client.on("keypress", function) listens for keys anywhere. Windows, tabs and panes have :on too, to listen only there. Each returns a subscription, whose :off() stops it. A pane's or tab's handlers go when it closes, and a window's when it closes.

client.on("turnend", function) hears a chat's turn end: its agent finished, or failed. It's heard once, however many windows show that daemon's chats, so a config can count turns or notify once. It can't be stopped, and only client.on hears it, as a chat's turn ends for every window. Its handler gets ev.chat, the chat's number, ev.title, ev.agent (as "Claude Code"), ev.failed (true or false, or nil from an older daemon that doesn't say), and ev.window and ev.pane, the window that heard it and the pane showing the chat there, if one does.

client.on("turnend", function(ev)
  if ev.failed then print(`{ev.title} failed`) end
end)

A handler gets the event, ev:

FieldIs
ev.keyThe key, as a binding writes it, such as <C-b> or q
ev.keysFor a binding, all of its keys
ev.textThe text the key types, if any
ev.modeThe mode's letter
ev.countFor a binding, the count typed before its keys, 0 if none, as Vim's v:count
ev.count1The same, but 1 if none, as v:count1
ev.pane, ev.windowWhere it was pressed

These are a key's. A chat's turn ending has its own, above.

A binding that lets its keys go on passes the count on with them, so 5x bound to a function that calls ev:propagate() still deletes five.

Windows, workspaces, tabs, and panes are handles: values that stand for one of them, whose fields are read as they are at the time. Reading a pane that has closed is a mistake. Two handles to the same pane, found through the same window, are equal.

FieldsMethods
clientwindows, focused (the focused pane of the window with the focus), opton, keys.map, keys.unmap, keys.group, cmd, forward, connect, disconnect
A windowworkspace, tab, paneon
A workspacename, tabson
A tabname, panes, focused, workspaceon
A panekind ("terminal", "chat", "editor", "explorer", "folder", "board", "review", "browser", or "other" for a kind this window doesn't know, or one on a machine not shared with it), title, tabon, split, close, focus

pane:split(side) puts a new pane on that side, "right", "left", "below" or "above", of the same kind, or another with { kind = "chat" } or { kind = "terminal" }. Those are the only kinds the config can make, so splitting any other pane, such as an editor, needs one. It waits for the daemon to make it, then focuses it, as Ctrl+B | does, and returns it:

client.keys.map("n", "<C-b>t", function(ev)
  local below = ev.pane:split("below")
  below:split("right")
end)

While it waits, the window carries on, and so does the key. Each handler and binding runs in a coroutine, a function that can pause partway and carry on later, so waiting holds up nothing else.

Nothing is shown while init.lua first runs, so client.focused is nil then: handles are for handlers. The first window is in client.windows already, to listen to with client.windows[1]:on.

The daemon's config #

The daemon, which runs terminals, agents and the web app for every window, has a config of its own, also in Luau: daemon/settings.lua, which clackatoo writes, then daemon/init.lua, your own, which runs after it and outdoes it. Each sets settings through daemon, a table for each group of them:

-- ~/.config/clackatoo/daemon/init.lua

daemon.machine.name = "jack-desktop"
daemon.web.mode = "tailscale"
daemon.history.lines = 20000

-- An agent of your own, and Claude Code run another way.
daemon.agents.opencode = { name = "OpenCode", command = { "opencode", "acp" } }
daemon.agents.claude = { command = { "claude-agent-acp" }, tasks = false }

A setting reads back what it is, the default until something sets it, so print(daemon.history.lines) prints 10000, and nil puts it back as it starts. daemon.agents is a table by name, so daemon.agents.mine.tasks = false changes one set above, = nil takes one out, and for name, agent in daemon.agents do … end goes through them (pairs finds none, as the table only stands for them). A name that isn't a word is written daemon.agents["my agent"]. Agent fields are described in Which agent. Specialists are defined separately in SPECIALIST.md files and edited in Settings; Lua does not define them.

require loads modules from daemon/lua/, or else the lua/ shared with the window's config, by a name of letters, digits, _ and -, a dot being a folder, as the window's does. Where an option was set, the file and line, is kept, as for the window's.

When it runs #

The daemon runs its config as it starts, and each time it upgrades, on a thread of its own, before it does anything else; a config of a few dozen lines takes about a millisecond.

It watches its files too: daemon/settings.lua, daemon/init.lua, and the modules they require, in daemon/lua/ and lua/. A quarter of a second after one changes, it runs the config again, on a thread of its own, never holding up the terminals. What can change as the daemon runs does, at once, for what it starts from then on: the agents new chats can start with, the limits on chats agents start, whether agents go on through upgrades, the notification when a long command ends, how terminals started then lay out emoji, and how many lines of terminals' history are kept, and how often. The rest, as the daemon's options say, is read only as the daemon starts: clackatoo upgrade, which keeps every terminal and agent running, takes it in.

Changes made outside clackatoo are said #

When the config runs again as its files changed, and not for a change you made in the settings menu, every window says what it changed of what runs programs, lets the web in, or keeps lines programs mark secret: any field of any agent, any specialist, a limit on chats agents start raised, any web. option, and any hints. option loosened, as daemon.hints.noagent = "show". The bar says each, with what it was and what it is, as config changed outside clackatoo: agents.claude command: { "claude-agent-acp" } → { "other" }, and the daemon's log says it too. Nothing waits on it: the change has applied, as any other does. If it isn't yours, put the file back. Saving daemon/init.lua yourself is said as well, as the daemon can't tell your editor from an agent's.

What this guards against #

Nothing, on its own: it tells you. An agent that can write your config as you can write any other file of yours too, and run what it likes; nothing in clackatoo stands in its way once it can. The daemon tells a window from an agent by what the connection is, a window's or an agent's tools', not by which program opened it: any program of yours can open its socket. What an agent may write and run is the agent's own permissions' to say, as Claude Code's are: they're the boundary. Keeping agents from writing clackatoo's folders is planned.

What clackatoo does keep from an agent is what it does through clackatoo: an agent's keys, or a chat with Control of a window, can't change the daemon's settings in the settings menu, nor the window's options that run programs or reach the network, with :set, :setp or the menu.

It runs in a sandbox. There's no io or os, nothing that loads code but require, and require reaches only those two folders. Luau's bytecode is never run, only text. A run may take half a second and 64 MB, or it's stopped where it is, and stays stopped, so a pcall can't carry it on: a loop that never ends can't hold up the daemon. As the daemon upgrades, its terminals waiting, a run may take a fifth of a second. The build an upgrade is to is asked first whether agents go on through it; it answers from what last ran, never running your init.lua for it.

When it goes wrong #

A mistake never stops the daemon. A value a setting can't hold, a name that isn't a setting, a Lua error, or a run stopped for taking too long, stops the config there, and none of what it set is used. Instead the daemon keeps what the config set the last time it ran without a mistake, kept in daemon-config.lua in clackatoo's state directory (~/.local/state/clackatoo). With none kept, as when no config has run yet, it goes by its defaults, but with terminals' history and the web app off until one has. It writes why in its log, and the first window you're at says so in its bar, with the file and line of the mistake that stopped it:

the daemon's config went wrong, so it kept its settings from the last time it ran: daemon/init.lua:4: daemon.history.lines is a whole number from 1 to 1000000

A config that stops running once the daemon has started, as you edit it, is the same: the daemon goes on by what it has, and every window says why in its bar, as does the settings menu, until the files run again.

Some settings are checked together, once the config has run, at the line that set the one that can't be: daemon.subagents.default more than daemon.subagents.working, daemon.images.terminal_mb more than daemon.images.total_mb, or a web app set to public without its certificate, key and origin.

Moved from TOML #

The daemon was set before in daemon/agents.toml, machine.toml and web.toml. The first time a daemon with this config starts or upgrades, and finds them there and no settings.lua, it moves every value they set into settings.lua, a line each, with their comments, and keeps the old files beside it as agents.toml.bak and so on. machine.toml's [terminals] becomes daemon.terminals. A value the config can't hold, or a key that was never a setting, is written commented out, saying why, so the rest still runs. A field an agent or specialist never had is left out alone, keeping the agent, as before. If any of web.toml is left out, so is its mode: the web app stays off until it's put right, as it did when web.toml went wrong. Every comment written is a line comment of its own, with nothing in it that could end it or open a block comment.

It goes in order, each step only once the one before has worked: the web app's password to the state directory (see the phone); then settings.lua, once it compiles; then the old files to .bak, web.toml's without its password, so no password stays in the config folder. If a step fails, the old files stay as they are and are read as they would have been, and the first window you're at says why. When it works, that window says what was moved, and what was left out.

That happens once. A TOML file there after it is passed over: the daemon's log and the first window you're at say so, and it can be deleted.

What outdoes it #

As for the window, the environment outdoes the config, for tests and CI: CLACKATOO_HISTORY (a folder, or off), CLACKATOO_HISTORY_LINES, CLACKATOO_HISTORY_EVERY and CLACKATOO_IMAGE_MEMORY (as 64,256) over the settings below, and CLACKATOO_AGENT over the command of the agent a chat gets when it asks for none. CLACKATOO_CONFIG names a folder to take the config from in place of ~/.config/clackatoo, keeping the web app's password and the last settings that ran in state in it, never in your own state directory; or it's off for none, as tests' daemons run.

The daemon's name #

daemon.machine.name names this machine's daemon, as other machines show it. Without it, the daemon takes the machine's hostname.

daemon.machine.priority = false has the daemon run as other programs do, rather than ahead of them.

Each daemon also has an ID of its own, chosen the first time it starts and kept in machine in clackatoo's state directory (~/.local/state/clackatoo), or in $CLACKATOO_MACHINE. Deleting that file makes the daemon a new machine to every other; copying it to another machine makes the two refuse each other until one of them deletes it. CLACKATOO_MACHINE=off chooses a new ID at every start, as tests do.

The daemon's options #

Each is set as daemon. and its name, such as daemon.web.mode = "public". Those of this machine, the web app, daemon.history.keep and the images' limits are read only as the daemon starts or upgrades; the rest change as its config runs again (see When it runs). The settings menu changes any of them.

This machine #

OptionIsStarts
daemon.machine.nameThe name other machines show this one by, as connections list them.none
daemon.machine.priorityThe daemon takes a higher priority and a place of its own, ahead of other programs.on

Agents #

OptionIsStarts
daemon.upgrade.keep_agentsAgents go on through an upgrade, with what they run, rather than being stopped and started again (see agents through upgrades).on
daemon.permissions.engineDefault engine for new chats: provider or clackatoo. Existing chats keep their selection. See permission rules.provider
daemon.permissions.rulesJSON array of literal Allow, Ask and Deny rules. Edited in Settings → Permissions.[]
daemon.plugins.claudeAllow Claude Code's native plugins and skills alongside shared skills. Takes effect after a daemon restart or upgrade.off
daemon.plugins.codexAllow Codex's native plugins and skills alongside shared skills. Takes effect after a daemon restart or upgrade.off
daemon.skills.disabledThe shared skills never offered to any agent, by name, with spaces or commas between them.none
daemon.mcp.providersAllow provider-managed MCP servers alongside clackatoo's managed servers. Takes effect after a daemon restart or upgrade.off
daemon.mcp.claudeClaude Code override: inherit, off, or allow. Takes effect after a daemon restart or upgrade.inherit
daemon.mcp.codexCodex override: inherit, off, or allow. Takes effect after a daemon restart or upgrade.inherit

Chats agents start #

How far chats agents start may go.

OptionIsStarts
daemon.subagents.workingThe most chats agents started that may work at once, in all, from 1 to 64.16
daemon.subagents.defaultA new chat's Subagents setting, from 0 (off) to working. Unless it's set, it's no more than working.6
daemon.subagents.openThe most chats agents started open under one of yours, from 1 to 256.32
daemon.subagents.startedThe most chats agents start under one of yours between two of your messages there, from 1 to 10000.128
daemon.subagents.depthHow deep chats agents start go, from 1 to 8.3
daemon.subagents.hopsThe longest chain of messages between agents, from 1 to 64.6
daemon.subagents.notice_turnsThe most turns notices of chats finishing start under one of yours between two of your messages there, from 1 to 10000.100

The web app #

How phones and browsers reach the daemon: see the phone.

OptionIsStarts
daemon.web.modeoff, tailscale (through tailscale serve) or public (straight from the network, over TLS).off
daemon.web.socketWith tailscale, the unix socket tailscale serve connects to. None is web.sock in the web app's data.none
daemon.web.loginWith tailscale, the only Tailscale login let in. None is the first device's, which only a window can let in.none
daemon.web.addressWith public, the IP address listened on.0.0.0.0
daemon.web.portWith public, the port listened on.8765
daemon.web.certificateWith public, the certificate chain's PEM file, read again when it changes.none
daemon.web.keyWith public, the certificate's private key's PEM file.none
daemon.web.originThe address the app is reached at, as https://host:port: requests for any other, or from a page anywhere else, are refused. Needed with public.none
daemon.web.expire_daysDays a device can go unused before it's unpaired, from 1 to 36500.90
daemon.web.password_daysDays before the password is asked for again, or 0 for never.0
daemon.web.askA device may ask to be let in from a window.on with tailscale, off with public
daemon.web.lock_afterWrong passwords in a row before pairing with the password locks, from 1 to 10000.50

What terminals keep #

OptionIsStarts
daemon.history.keepTerminals' scrollback is kept across restarts.on
daemon.history.linesThe most lines kept of each terminal, from 1 to 1000000.10000
daemon.history.everyHow often, in seconds, the scrollback of terminals that changed is written, from 1 to 86400.30
daemon.images.terminal_mbThe most MiB of images each terminal, chat, picture pane or Markdown buffer may hold.64
daemon.images.total_mbThe most MiB of images they may hold together.256

The daemon's terminals #

How the daemon's terminals behave, for every window.

OptionIsStarts
daemon.terminals.notify_afterHow many seconds a command must run for its end to be told in a notification while you aren't looking at its terminal, up to 86400. 0 tells none.10
daemon.terminals.vs16Variation selector 16 widens an emoji to two columns. Terminals already open keep what they started with.on
daemon.hints.hideLines programs mark hidden: mask masks them until you ask to see them; show shows them.mask
daemon.hints.nosaveLines programs mark nosave are never written to disk.on
daemon.hints.noagentLines programs mark noagent: hide keeps them from agents; show lets agents read them.hide
daemon.hints.shown_forHow many seconds hidden lines you asked to see stay shown, from 1 to 86400.30

When it goes wrong #

A mistake, such as a key that doesn't exist, a mode that isn't one, or a pane that has closed, is shown in the bottom bar, with the file and line, until the next key, and written in full to the window's log, window.log in clackatoo's state directory (and to stderr, for a window opened in a process of its own). A mistake in init.lua itself stops it there, as an error in any Lua program does: what it bound before that line stays bound.

init.lua can run for 2 seconds before it's stopped where it is. A handler or binding that runs for more than a quarter of a second, as a loop that never ends would, is stopped there, and its key is decided as if it had done nothing more. The quarter second is counted from when it starts, or what it waited for comes, until it finishes or waits again, across its slices.

print writes to the window's log, window.log in clackatoo's state directory, which keeps what it prints unless RUST_LOG says otherwise (and to stderr, for a window opened in a process of its own).

Known limits #

  • The daemon's config only sets settings: it has no events or handles yet.
  • The settings menu has no colour options yet, as no option is a colour. The web app's password isn't one of its settings: clackatoo web password sets it.
  • A config file that's a link, as stow makes, is watched where the link is: an edit of the file it goes to, made elsewhere, isn't seen until :reload, or for the daemon's, the next change beside the link.
  • The settings menu can't record Enter, Esc or Backspace as keys, nor Ctrl+;, which closes it.
  • Bindings made in Lua don't show in Ctrl+B's list in the bottom bar.
  • Keypresses and chats' turns ending are the only events.
  • client.opt can't set a window's own value: :setlocal can, through client.cmd.
  • There are no type definitions for editors to complete the API with.

Edit this page