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.
new(pull : JSON::PullParser)
Sourcenew(active : String = "default", profiles : Hash(String, Profile) = {"default" => Profile.new})
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
active
Sourceactive=(active : String)
Sourceactive_profile
The selected profile, falling back to any survivor (a stale "active" name, or an emptied file).
profiles
Sourceprofiles=(profiles : Hash(String, Profile))
Sourcesave(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.