Updated Edit
On this page
Runs a terminal animation showing sawtooth-wave simulated usage across context window, 5-hour, weekly, and extra usage bars.
#internal/demo
#internal/demo
Package demo animates the statusline from synthetic sawtooth usage waves, so the bars and their gradient can be seen without waiting for real usage.
#WaveState
type WaveState structWaveState holds the computed wave values for a single frame.
#ComputeWaves
func ComputeWaves(t float64, isLast bool) WaveStateComputeWaves calculates the sawtooth wave values at time fraction t (0-1). isLast pins all values to 100%.
#Run
func Run(durationSec int) errorRun executes the demo animation for the given duration in seconds.