settings: the config, in the settings window
On this page
lokyr/settings · bundled · source
The Settings, Keys and Themes pages of the settings window: every key of your config, Lokyr's own and the bundled plugins', by its section, of what it does, the platforms where it applies and its value in force, which you change there, Lokyr writing it into your config file; every binding of keys; every theme, of a preview of its colors; and every color of the theme in force, of where it comes from. The settings window itself is of Lokyr Light or Lokyr Dark, by the appearance, whatever theme your terminals use.
The page
- Lokyr › Open Settings Window opens the settings window at the page, its first; the window's tab Settings shows it too.
- Its sidebar lists the config's sections, as Font, Window or Theme, each of an icon of its own, then the sections of Lokyr's own plugins that have settings, as Tabs or Find, then, after a line, those of the plugins that you installed · Since 1.5; a click or the arrows choose one, and the page opens at the first.
- A search that finds nothing says so in the middle of the page, of words to try · Since 1.4.
- Its search field, at the sidebar's top, which has the keyboard as the window opens, shows the sections, and in each the keys, that hold every word typed, whatever its case, in a key's name, in what it does or in its section's title; the bindings of keys are the Keys page's, of its own filter. The section chosen stays while it holds them, else the first that does; the button at the field's end empties it, as Escape does while the field holds text · Since 1.4.
- The keys of a section show in a group box, as System Settings groups its rows: a rounded fill, a hairline between each two keys · Since 1.4.
- A plugin's section starts with an Enabled switch, which turns the plugin on or off, as the Plugins page does, writing
enabledin its section of your config: while the plugin is off, such as Blocks, which starts off, its keys are dimmed and their controls disabled, and they apply once you turn it on · Since 1.4. - A replaced plugin's section, such as the command header's while Blocks runs, shows a note above its keys, naming the plugin that replaces it: its keys apply only while that plugin is off · Since 1.4.
- Each key shows its name, the platforms where it applies where it does not apply on every one, what it does, More info, which opens its text in the config guide in your browser, of your version of Lokyr, Documentation, where a page of the documentation tells its topic, such as shell integration's, which opens that page on lokyr.dev · Since 1.3, and at its right a control of its value in force, as your config gives it or as its default:
- a boolean, a switch, its knob at the right and the track of the accent's color while it is on · Since 1.4;
- a key of a few values, a pop-up button of its value, whose menu lists the values, opening over it as macOS's pop-up buttons open theirs, the one in force ticked over its text · Since 1.4;
- a font's family, a menu of the system's families, the monospaced ones of the text's own family, every one of the text past ASCII's and of the interface's; a font's style, a menu of the styles of the section's family, or of the family in force; the terminal's family and its faces' styles show in the panes as their menus' items rest highlighted, by the arrows or the pointer, the font in force back as the menu closes of no choice; a family chosen comments out the config's styles that it lacks, as the font would not apply of them, for you to take back;
- a plugin's color, a menu of the theme's colors by their tokens, of a swatch of the color beside it;
- a number, a field, whose value ↑ and ↓ step, of the key's step, within its range;
- a text, a field, empty where your config leaves out a key of no default;
- a list, as
[agents] programs, its values under what it does, each of a Remove link, and a field that adds one as you press Return; - a table, its value as the config writes it, which you change in the file.
- A change writes the key into your config file, keeping the rest of it and its comments, and applies at once, as saving the file would: a switch or a menu's value as you choose it, a field's value as your typing pauses, as you press Return and as you leave the field. An empty field, or Reset, the link at the row's bottom right, which shows once the key is off its default, takes the key out of the file, its default in force again.
- A value that the key does not take, past its range, not a number, or a whole number's fraction, is not written, and the page tells why under the key, until a value is written.
- A config file that does not read shows its error over the page, of its line and its column: the page shows the settings that applied last, and writes nothing until the file reads again.
- The page follows your config: saving the file shows the new values at once, the fields too.
- The keys, their texts and their values are those of the config guide, which the same schema of the config makes. Lokyr › Settings… (⌘,) opens the file itself, for the keys that the page does not change.
The Keys page
- The window's tab Keys, between Settings and Themes, has at its top a field that filters its bindings as you type, of their commands' titles and names, their keys as macOS writes them and as the config does, their arguments and contexts, its button emptying it, the page shown anew of an empty field; it lists every binding of keys in force, Lokyr's defaults and your config's
[keys], a default that a later one of the same keys hides wherever it holds left out, as ⌘W's Close Window under Close Tab while the tabs run, by the categories of their commands, as Windows, Tabs or Edit, each of its keys as macOS writes them, as ⇧⌘N, drawn as key caps · Since 1.4, of the title of the command that it runs, of its name, its arguments and the context where it holds, and of "your config" where it is yours; keys that your config takes away show as such, of the default's title. A click on a binding's keys shows a field that records a shortcut: the shortcut that you press writes the command at the new keys and, of a default,falseat its old keys, so that the shortcut moves, a global key staying global; leaving the field changes nothing. A shortcut that another binding takes says which, the one that runs it now, and pressing it again takes its place, in your config's own entry where it is yours. Remove takes a default away, writingfalseat its keys, or takes your own binding out of the file; Restore gives a default back, taking itsfalseout. A default whose keys other defaults share, in other contexts, as ↑ the palette's and the copy mode's, neither moves nor goes, asfalseat its keys would take them from the others too, which the page names. macOS's own shortcuts, of its app menu, Quit's ⌘Q and Settings' ⌘,, show as such, and neither change nor go. Add, above the bindings and below them, opens a panel of a new binding in the middle of the window: its shortcut, which you press while its field has the keyboard, ⌘ and the menus' shortcuts too, none of them running meanwhile, shown as macOS writes it, Delete taking it away; and its command, from a menu of the commands by their categories. A shortcut that another binding takes says which, the one that runs it now, the new binding taking its place; a binding that would do what its shortcut already does is none to add, Add dimmed; macOS's own take none. Add writes the binding into your config, Cancel or Escape closes the panel. - A config file that does not read shows its error over the page too, which writes nothing until the file reads again.
The Themes page
- The window's tab Themes shows every theme that Lokyr has, the built-in ones, the collection's, and yours of the themes' folder beside your config, of a sidebar of the appearances, Dark and Light, of the one in force first, which a click chooses, then, after a line, the Editor.
- The themes are read off Lokyr's main thread, a progress showing as their list is read, then the cards, each preview a placeholder until its theme's colors come.
- Each theme is a card of a preview of its colors, a sample terminal that Lokyr draws: its background, a prompt, an
lsof colors and its sixteen colors, and its name; the theme that your config's[theme]names for its appearance has the accent's border. - A click on a card names its theme in
[theme],lightordarkas the theme is, which shows at once where its appearance is in force. A card of the other appearance asks first whether to use its theme for its appearance alone, the default, which shows as that appearance comes, or for both, which shows at once. The Settings page keeps[theme]'sminimum-contrastalone. - Show in Finder, at the title's row, shows the themes' folder in the Finder, as View › Open Themes Folder does, making it first if it is not there.
- New…, beside them, makes a new theme of Lokyr's own values of the appearance that the page shows, Lokyr Light's or Lokyr Dark's, every key written, the terminal's optional ones, as
cursorandbold, as comments of their defaults, and the interface colors that it leaves to their rules, asfocus.ring, as comments of the rules: Lokyr asks its name, "New Dark Theme" first, or the first of a number after it that no theme has, writes it into the themes' folder, uses it and shows it in the Theme Editor. - Import…, beside it, shows the system's open panel, of
.itermcolorsand.tomlfiles, several chosen at once, as View › Import Themes… does: each that holds themes is copied into the themes' folder as it is, one question asking whether to replace the files of a name there already or to skip them; the themes show at once, and an alert tells how many were imported, by their names, and the files that were not, as one that holds no theme. - A card's context menu, of a secondary click, at the pointer, has Use, as a click; Edit, which shows the card's theme in the Theme Editor, dimmed for a theme of the collection or a built-in one, which a copy edits; and Duplicate…, a new theme of every color of the card's: Lokyr asks its name, writes it into the themes' folder and uses it, its card chosen, which Edit then shows in the Theme Editor.
The Theme Editor
- Editor, at the Themes page's sidebar after the appearances and a line, shows every color of the theme in force, or of the one that a card's Edit chose, at its left, as iTerm2's colors do: the terminal's, its keys of
[terminal], asbackground,cursororselection, and its palette's 16, then the interface's tokens by groups, astext,accent,tabsor a plugin's; each of a swatch of its color over the terminal's background, its name, its value under it, as#4c9bff99, and, as the pointer rests on the swatch, where it comes from: a theme's file and its line, of the theme itself or of one that it extends, a theme of no file, as Lokyr Dark, or its rule, asaccent / 60%, as the authors' guide tells, or, of a key of[terminal]that the theme leaves out, the color that it takes, as the cursor the text's. - The field at its top filters the tokens as you type, of their names, values and origins.
- Saved, a theme's file shows at once: the tokens that changed are lit for three seconds.
- The button at a token's right opens its theme's file at its line in your editor, or, for a color of no file of yours, copies its line to paste into a theme: a token's, as
"focus.ring" = "accent / 60%", a key of[terminal]'s, ascursor = "#e6e6e6", or a palette's color. - The theme's menu, beside Theme at the top, shows the theme shown and lists every theme: yours of the themes' folder first, then the collection's and the built-in ones in a submenu of each appearance. The one chosen shows in the Editor alone, its colors in the page and in the previews at its right: your terminals keep their theme, and change as you edit only where the theme edited is the one that they use. The Editor shows the theme in force again as an appearance's themes show or the page hides.
- A theme of yours of Lokyr's format edits in place: a click on a color's row opens a field of its value as the file writes it, under the row: a color, as
#4c9bff, or for an interface color an expression of other colors, asaccent / 40%ormix(background, foreground, 8%), as the authors' guide tells; a color left to its rule or its default shows it as the field's placeholder. Lokyr writes the value into the theme's file as you pause, press Return or leave the field, keeping the file's comments and order, and shows it at once; a value that does not read, or whose colors do not resolve, as a name of no color or two colors that name each other, is not written, and why is told under the field as you press Return, leave the field, or stop typing for a couple of seconds. Reset, under the field at its right, puts the color back as it was when the Editor showed the theme, written into its file again, or taken away of a color that its rule colored then; it shows once the color has another value. - A click on a color's swatch of such a theme opens the system's color panel of its color, of its opacity's slider for an interface color: each color that you choose, of the wheel, the sliders, the hex field or the eyedropper, shows at once in the Editor's previews, and in your terminals if they use the theme, its field telling it, and is written into the theme's file once the panel rests for a moment, or as it closes. The panel follows the row that you choose, and closes as another theme shows or the Editor hides.
- Guide for theme authors, a link at the foot of the colors, opens the authors' guide of the version of Lokyr that runs, on GitHub, in your browser.
- A theme that cannot be edited as it is shows a lock beside its name: one of the collection or a built-in one, which the lock copies, as Duplicate… does, its name asked, into your themes folder, uses and shows in the Editor; or an
.itermcolorsfile of the folder, whose conversion to Lokyr's format the Editor asks as it shows it, and again of the lock: converted, the theme keeps its name, its colors written as a file of Lokyr's format, so does the other appearance's theme of a file of both, and its.itermcolorsfile goes to the Trash, from which you can put it back. - At its right, a window of the theme, whatever the settings window's own colors: a tab bar, of a tab active, one under the pointer and the others; a scroll bar of its thumb and the marks of a search's matches; a second pane under the divider, its half lit as a tab dragged over it lights it; and a terminal, drawn as the panes draw theirs: prompts of a command that succeeded, one that failed and one that runs, of the gutter's bars; an
lsof colors and a link; the 16 colors as text and as backgrounds; bold, faint, italic, underlined, curly, struck and inverse text; a selection and the find's matches; an error and a warning; and a block cursor over a character, on the cursor guide's row. It follows the theme as you edit it or save its file. - Below it, a plugin's panel of the theme, over the terminal's background, as a plugin would show one: a title and texts, secondary, of success, of a warning and dimmed; a field and a focused one of a selection; toggles and a switch; a segmented control over a list's rows, one selected and one selected without the keyboard; progresses of each state; a log that scrolls; a tooltip; and buttons, a link and a dimmed one among them. Its controls are real: they take the pointer, so that a hover's and a press's colors show. A click on a part of either preview marks the tokens that it takes in the list, and a click on a token's row marks the parts that take it; a second click takes the mark away.
Commands
It has no command: Lokyr › Open Settings Window opens its page.
Configuration
It has no keys of its own.
Turning it off
[plugins.settings]
enabled = false
The Settings page goes; the settings window shows its other pages.
Permissions
It asks to write the clipboard, clipboard-write, for a token's line that the Theme Editor copies; to show a theme or a font in place of the one in force, appearance-write; and for the config's settings, config, which Lokyr's own plugins alone may hold: it reads every key of the config and of the plugins' sections, with their schemas, and writes the keys that you change into the config file, and, of your answers, copies a theme into the themes folder and converts an .itermcolors one there.