# Preferences

Preferences collect every setting Bobby Tables has in one window with a search box. Switches and choices apply as soon as you change them, and every setting stays on this computer.

## Where to find it

| Action | How |
| --- | --- |
| Open Preferences | `⌘,` (`Ctrl+,`), or `Preferences...` in the Home menu beside `New connection` |
| Open from the menu bar | `Bobby Tables` > `Settings…` on macOS, `App` > `Preferences…` on Linux |
| Find a setting | Type in `Search settings`, then choose a category |
The window lists five categories: `Appearance`, `General`, `Connections`, `Data` and `Agents`. Typing in `Search settings` replaces the list with the categories that hold a match, each showing the first matching setting. Choosing a result opens that category and clears the search.

## Appearance

`Theme` is the only setting under `Appearance`, with `System`, `Light` and `Dark`. `System` follows the operating system appearance and changes when it does. The theme changes as soon as you select it.

## General

`General` holds `Startup`, `Updates` and `License`. `Restore last session` is `Always`, `Ask` or `Never`, and with `Ask`, the default, Home offers `Restore` or `Start fresh` when saved tabs exist. [Updates and trust](https://bobbytables.app/docs/updates) covers `Check for updates automatically`, and [License](https://bobbytables.app/docs/license) covers the license section.

![Home with a Restore last session? bar reading 2 workspaces, 2 tabs, and Start fresh and Restore buttons above the saved connections.](https://bobbytables.app/docs/img/connections/09-session-restore.png)

_With Ask, Home offers the last session when saved tabs exist._

## Connections

`Keep connections alive` is the only setting under `Connections`, and it is on by default. While it is on, the app probes open sessions that have gone idle, so a quiet connection is still there when you return to it. Changing it applies to every open session straight away.

## Table filters and query results

`Default filter state` decides how a table's filter bar starts: `Restore last` brings back its last filters, `Always show` opens an empty bar, and `Always hide` keeps it closed. `Exact row count threshold` sets the table size above which row counts are estimated. `Maximum rows per query` and `Maximum result memory` cap each result, by default at 100,000 rows or 256 MB. Each number shows its default and allowed range, and applies when you leave its field.

## Display directives and enums

`Interpret display directives in column aliases` is on by default, and `Load remote image previews` is off, because loading an image reveals your network address to its host. `Default currency` takes a three-letter ISO 4217 code for money directives that name no currency. `Enum definitions` shows where `enums.json` lives and how many enums it loaded, or why it failed, with `Reload` and `Reveal file`.

![The Data category of Preferences showing the Result display directives switches, Default currency set to USD, and Enum definitions reading 1 enum loaded with Reload and Reveal file.](https://bobbytables.app/docs/img/result-directives/07-enum-definitions.png)

_Directive settings and enum definitions share the Data category._

## Good to know

- Settings are saved in `preferences.json` in the app data directory, `~/Library/Application Support/com.bobbytables.desktop` on macOS and `~/.local/share/com.bobbytables.desktop` on Linux.
- The theme is saved in `prefs.json` beside it. `enums.json` is in the app config directory, which is the same folder on macOS and `~/.config/com.bobbytables.desktop` on Linux.
- Nothing in Preferences is synchronized or sent anywhere.
- A number or a currency code applies when you leave its field, and Escape puts the saved value back.
- `Agents` holds the switch that lets coding agents connect, described on [Agents](https://bobbytables.app/docs/agents).

## Related

- [License](https://bobbytables.app/docs/license.md)
- [Updates and trust](https://bobbytables.app/docs/updates.md)
- [Result display directives](https://bobbytables.app/docs/result-directives.md)
- [Table data](https://bobbytables.app/docs/table-data.md)
- [Agents](https://bobbytables.app/docs/agents.md)
