# Settings and the settings file

Settings is the one place for the choices Mayhap leaves to you: how the page looks, how writing behaves, which AI it asks and which keys do what. Every choice there is also a line in a file, settings.json, so you may set Mayhap up from either one and they stay in step.

## Opening Settings

To open Settings, press `Ctrl+, / ⌘,` or choose *Settings…* in the file menu. A large card opens over the window. Its left column lists the sections, *Look*, *Writing*, *AI* and *Shortcuts*, and the right shows the one you've chosen. The first time, that's *Look*; after that, Settings opens on the section you used last.

![Settings open on Look: Theme, Marks, the list of fonts and the switches under it](https://mayhap.app/build/assets/settings-Cczs07ZA.webp)

To move between sections, click one, or press `Ctrl+Tab / ⌃Tab` and `Ctrl+Shift+Tab / ⌃⇧Tab`. Within a section, `Tab` and `Shift+Tab / ⇧Tab` move between the controls and `Return` uses the one you're on. Press `Esc` or click the × to close Settings and go back to your text.

A change in *Look* or *Writing* applies at once, in every open window, and is saved for you. There's nothing to confirm.

## Look

*Look* holds how the page and the bars appear.

Theme
: *System*, *Paper*, *Ink* or *Custom*, the colors Mayhap draws with. By default it follows your system's light or dark setting. You can learn more about themes in [Themes and marks](https://mayhap.app/guide/themes-and-marks).

Marks
: *Pencil* draws every mark on the page by hand; *Clean* draws the same marks exactly.

Font
: The font your text is set in. The list holds every font installed on your computer, each name in its own face, with the bundled Geist Mono first and marked *default*. Type in *Search fonts* to narrow it, then press `↑` or `↓` and `Return`, or click. The line under the list shows the font you've chosen.

Reduce motion
: Fewer and gentler animations. Nothing slides or moves, and fades are kept short.

Show keys while holding Ctrl
: Holding `Ctrl / ⌘` on its own for half a second shows each bar control's key beside it. On a Mac, this switch reads *Show keys while holding Cmd*.

Fade the bars while typing
: After a few characters typed into the page, both bars fade almost away. They come back as soon as you move the mouse.

## Writing

*Writing* holds how Mayhap behaves while you write. When the card is short, this section scrolls.

Reopen the documents open at quit
: When you start Mayhap without a document to open, it opens again the documents you had open when you last quit. On by default.

Save automatically
: A document that has a name is saved a moment after you stop typing, and when you leave its window or close it. Off by default, so Mayhap saves only when you ask.

Documents folder
: Where a new document is saved first, and the folder *Open…* searches. By default it's a *Mayhap* folder in your *Documents* folder. Click *Change…* to choose another.

Alternatives layer in new windows
: Whether a new window shows the marks for text that has versions. The toggle in the top bar changes one window at a time.

Show the bar over selected text
: Formatting and Mayhap's actions appear above any text you select.

Show hints
: Now and then, one line in the bottom bar names the key for what you just did, or a gentler way to do it. Each hint shows once.

Smart punctuation
: Curly quotes, dashes and ellipses as you type: straight quotes become curly ones, two hyphens an em dash and three dots an ellipsis. After Cyrillic text, the quotes are „ “. Code, web addresses and Markdown's own marks are left alone.

Focus
: Keeps the line you're writing in the middle of the page, and fades every paragraph but yours. `Ctrl+Shift+D / ⇧⌘D` turns it on and off as well.

Check spelling
: Faint dots mark words the dictionary doesn't know. Under *Languages*, choose the dictionaries your words are checked in. Until you choose, Mayhap uses every dictionary it finds on Linux, and the languages your system is set to on macOS and Windows.

Font for PDF
: The font a PDF is set in, chosen from your installed fonts as in *Look*. Literata unless you choose another.

## AI

*AI* holds which AI Mayhap asks and how it reaches it. Unlike the other sections, nothing here applies until you click *Save*, which also closes Settings. *Close* leaves everything as it was.

Provider
: Who answers: Anthropic, OpenAI, Google Gemini, xAI, DeepSeek, Qwen, Mistral, OpenRouter, Ollama, LM Studio, or *Other (OpenAI-compatible)* for any other service that works like OpenAI's.

Base URL
: Shown for *Other (OpenAI-compatible)* only: the address of the service. Every other provider has its own.

Model
: The model to ask, picked from the provider's own list, or typed by hand with *Type a name instead*. Left blank, the provider's own default is used.

API key
: The key the provider gave you. Mayhap keeps it in your system's keychain, never in *settings.json*, and shows only a dot for each character. *Remove* takes it out of the keychain. Ollama and LM Studio run on your own computer and need no key, and with OpenRouter you may click *Sign in with OpenRouter* instead of pasting one.

The line at the top of the section tells you what's in use now: the provider, the model, and whether a key is saved.

## Shortcuts

*Shortcuts* lists every command with its keys, and lets you give any command other keys or none. Each change is saved at once. You can learn more about this in [Keys](https://mayhap.app/guide/keys#rebind).

## The settings file

Every setting in the window is also written in a file, *settings.json*. If you prefer to set Mayhap up in a text editor, or to keep the file with the rest of your setup, click *Open settings file* at the foot of the sections. Mayhap opens it in your system's app for it, writing it first if there isn't one yet.

The file sits in Mayhap's own folder, with *keymap.json* and the *themes* folder beside it:

Linux
: *~/.config/mayhap*

macOS
: *~/Library/Application Support/Mayhap*

Windows
: *%APPDATA%\Mayhap*

The settings are grouped as the window groups them, under *look*, *writing* and *ai*. The file may hold comments and trailing commas, and when Mayhap writes it new, every setting is there with its value and a comment naming its choices. For example, to switch to clean marks, change *"marks": "pencil"* under *look* to *"marks": "clean"*, and save.

Once you save the file, every window takes the change a moment later. Every setting is optional, so you may keep only the ones you've changed. Of course, you may still use the window: a change made there rewrites only that one value, and your comments, order and spacing stay as you wrote them.

Mayhap also writes *settings.schema.json* beside the file. An editor that reads JSON schemas uses it to complete each setting and check its value as you type.

### Settings only in the file

A few settings have no control in the window:

look.light_theme and look.dark_theme
: The themes *System* draws with while your system is light and while it's dark. Paper and Ink by default.

look.markdown_marks
: Whether a new window shows Markdown's marks as you typed them, *"shown"*, or hides them, *"hidden"*. Hidden by default. `Ctrl+Alt+M / ⌥⌘M` changes one window at a time.

### Every setting

| Setting | In Settings |
| --- | --- |
| look.theme | Look › Theme |
| look.light_theme, look.dark_theme | only in the file |
| look.marks | Look › Marks |
| look.markdown_marks | only in the file |
| look.font | Look › Font |
| look.reduce_motion | Look › Reduce motion |
| look.keys_while_holding_ctrl | Look › Show keys while holding Ctrl |
| look.fade_bars_while_typing | Look › Fade the bars while typing |
| writing.reopen_documents | Writing › Reopen the documents open at quit |
| writing.save_automatically | Writing › Save automatically |
| writing.documents_folder | Writing › Documents folder |
| writing.alternatives_layer | Writing › Alternatives layer in new windows |
| writing.selection_bar | Writing › Show the bar over selected text |
| writing.show_hints | Writing › Show hints |
| writing.smart_punctuation | Writing › Smart punctuation |
| writing.focus | Writing › Focus |
| writing.check_spelling | Writing › Check spelling |
| writing.spelling_languages | Writing › Languages |
| writing.pdf_font | Writing › Font for PDF |
| ai.provider | AI › Provider |
| ai.base_url | AI › Base URL |
| ai.model | AI › Model |

## When the file has problems

Mayhap reads each setting on its own, so one mistake never costs you the rest. A name that isn't a setting, or a value a setting can't take, makes that one setting fall back to its default, and everything else in the file applies.

When that happens, the top bar says so after the document's name, for example *settings.json has 2 problems*. Click it to see each problem with its line, such as *"theem" isn't a setting. Did you mean "theme"?*, then *Open settings.json* to fix it. The notice stays until the file reads well. A setting written twice is read from its last copy, and each earlier copy counts as a problem.

If the file can't be read at all, for example because a brace is missing, the settings you had stay in force, or the defaults when Mayhap is just starting. Mayhap never saves over a file it can't read: a change you make in the window still applies until you quit, and Settings tells you it wasn't saved. *keymap.json* and theme files are read the same way, each with its own notice.

## Keys

| Command | Linux, Windows | macOS |
| --- | --- | --- |
| Settings… | Ctrl+, | ⌘, |
| Next section | Ctrl+Tab | ⌃Tab |
| Previous section | Ctrl+Shift+Tab | ⌃⇧Tab |
| Next control | Tab | Tab |
| Previous control | Shift+Tab | ⇧Tab |
| Use the control | Return | Return |
| Close | Esc | Esc |
