module Thyme::Format
Overview
Handles returning formatted strings presented to the end user.
Extended Modules
Defined in:
thyme/format.crInstance Method Summary
-
#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.
-
#status(total_seconds : Int64, suffix : String, on_break : Bool, config : Config)
Returns formatted timer string for Tmux's status.
-
#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.
Instance Method Detail
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.
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.
Determines which color to use for the current time: break, warning, or default.