# Edit Qesh configuration

## Open the editor

1. In the desktop app, choose three-dot menu → Configure, or press Cmd+,.
2. Edit the JSON.
3. Choose Save.
4. Open a new window to apply the starting folder, shell, and full terminal theme.

Fonts and tab placement update in existing windows. Saving does not restart current shells.

## Configuration example

```json
{
  "defaultPath": "~/Documents",
  "shell": "/bin/zsh",
  "fontFamily": "Menlo, Monaco, monospace",
  "fontSize": 14,
  "tabsPosition": "left",
  "theme": {
    "background": "#0e0d11",
    "surface": "#141318",
    "foreground": "#d4d4d4",
    "muted": "#a09ca8",
    "border": "#45414e",
    "primary": "#9cdcfe",
    "error": "#f48771",
    "selection": "#264f78"
  }
}
```

## Allowed values

| Setting | Value |
| --- | --- |
| `defaultPath` | Absolute folder, `~`, or `~/…` |
| `shell` | Absolute executable path |
| `fontFamily` | Installed font name or a font fallback list |
| `fontSize` | Integer from 10 to 28 |
| `tabsPosition` | `left` or `top` |
| Theme colors | Six-digit `#RRGGBB` values |

The active JSON file is `~/Library/Application Support/Qentrah/Qesh/config.json`. Run `qh config path` to print it. The previous sidecar file is imported on first use when no global config exists. Choose Open in Editor in Configure to open that file in your external editor.

## Fix invalid edits

The editor rejects invalid JSON, unsupported settings, out-of-range font sizes, and invalid colors. A failed Save keeps the previous file. If an externally edited file fails on launch, the app reports the error and uses defaults. Correct the JSON and open a new window.

A missing starting folder falls back to the home folder. If a shell cannot start, check that its absolute path exists and is executable.

`qh` reads the same global configuration for its shell and colors. Its CLI starts in the launch directory. Desktop fonts and tab placement remain desktop settings.
