class

Egui::Terminal::Config

Inherits JSON::Serializable < Reference < Object

The whole settings file: named profiles plus which one is active.

Constructors

load(path : String = ConfigStore.path) : Config

Load from path (the platform store by default). A missing file or corrupt JSON yields the defaults — a bad settings file must never keep the terminal from booting.

Source
new(pull : JSON::PullParser)
Source
new(active : String = "default", profiles : Hash(String, Profile) = {"default" => Profile.new})
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

active
Source
active=(active : String)
Source
active_profile

The selected profile, falling back to any survivor (a stale "active" name, or an emptied file).

Source
profiles
Source
profiles=(profiles : Hash(String, Profile))
Source
save(path : String = ConfigStore.path) : Nil

Persist to path (the platform store by default). Best effort: on IO errors the app keeps running with the in-memory settings.

Source