class Thyme::Config

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.cr

Constant Summary

THYMERC_FILE = "#{ENV["HOME"]}/.thymerc"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(input : YAML::Any) #

THYMERC_FILE is validated on initialization


[View source]

Class Method Detail

def self.parse(file = THYMERC_FILE) #

Returns a Config from a YAML file


[View source]

Instance Method Detail

def color_break : String #

[View source]
def color_default : String #

[View source]
def color_warning : String #

[View source]
def hooks : HookCollection #

[View source]
def options : Array(Option) #

[View source]
def repeat : UInt32 #

[View source]
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.


[View source]
def status_align : StatusAlign #

[View source]
def status_override : Bool #

[View source]
def timer : UInt32 #

[View source]
def timer_break : UInt32 #

[View source]
def timer_warning : UInt32 #

[View source]