# `Raxol.Core.UserPreferences`
[🔗](https://github.com/DROOdotFOO/raxol/blob/v2.8.0/lib/raxol/core/user_preferences.ex#L1)

Manages user preferences for the terminal emulator.

Acts as a GenServer holding the preferences state and handles persistence.

Uses `Raxol.Core.Utils.Debounce` for debounced save operations, avoiding
redundant disk writes when multiple preference changes occur in quick succession.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `default_preferences`

Returns the default preferences map: theme, terminal, accessibility and
keybindings sections.

raxol_core does not depend on raxol_terminal, so the `:terminal` section is
read from application config, first match wins:

  1. `config :raxol_core, :default_terminal_preferences, value`, for a
     consumer that wants its own defaults;
  2. `:default_terminal_preferences` in the `:raxol_terminal` application
     env, which raxol_terminal ships in its `.app` file as
     `{Raxol.Terminal.Config.Defaults, :generate_default_config, []}`;
  3. otherwise `%{}` (raxol_core on its own).

`value` is a map or an `{module, function, args}` whose call returns a map.
Anything else, including an MFA whose function is not exported, logs a
warning and yields `%{}`.

# `get`

# `get_all`

# `get_theme_id`

Returns the current theme id as an atom, defaulting to :default if not set or invalid.

# `handle_manager_cast`

# `reset_to_defaults_for_test!`

# `save!`

# `set`

# `set_preferences`

# `start_link`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
