class Thyme::Config
- Thyme::Config
- Reference
- Object
Overview
Reads THYMERC_FILE, parses it, and stores its configuration. There should be one instance of Config which gets passed to all other classes. All values are optional.
Defined in:
thyme/config.crConstant Summary
-
THYMERC_FILE =
"#{ENV["HOME"]}/.thymerc"
Constructors
-
.new(input : YAML::Any)
THYMERC_FILE is validated on initialization
Class Method Summary
-
.parse(file = THYMERC_FILE)
Returns a Config from a YAML file
Instance Method Summary
- #color_break : String
- #color_default : String
- #color_warning : String
- #hooks : HookCollection
- #options : Array(Option)
- #repeat : UInt32
-
#set_repeat(count : String | Nil = nil)
Called when the --repeat flag is used.
- #status_align : StatusAlign
- #status_override : Bool
- #timer : UInt32
- #timer_break : UInt32
- #timer_warning : UInt32
Constructor Detail
Class Method Detail
Instance Method Detail
def set_repeat(count : String | Nil = nil)
#
Called when the --repeat flag is used. If no argument is given, falls back to default used in THYMERC_FILE. If no default is there, set to 0 for unlimited repeats.