module

Thyme::Format

Handles returning formatted strings presented to the end user.

Instance methods

repeat_suffix(repeat_index : UInt32, repeat_total : UInt32)

Returns repeat string to tell user which pomodoro they're currently on and how many there are in total. If repeat is off, return a blank string.

status(total_seconds : Int64, suffix : String, on_break : Bool, config : Config)

Returns formatted timer string for Tmux's status. Note that suffix is a parameter here so we can cache the repeat_suffix outside of the seconds loop, since it only gets re-calculated after a pomodoro/break ends -- while the rest of the status is updated per second.

tmux_color(total_seconds : Int64, on_break : Bool, config : Config)

Determines which color to use for the current time: break, warning, or default.

with_color(text : String, color : String)

Wraps a string with a Tmux template for colors.