A small TUI based timer with Work/Rest cycles and sound
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

foor

+12 -2
+1
.gitignore
··· 1 + .DS_Store/
+11 -2
main.odin
··· 4 4 import "core:sys/posix" 5 5 import "core:time" 6 6 7 + foreign import libc "system:c" 8 + 9 + @(default_calling_convention="c") 10 + foreign libc { 11 + system :: proc(command: cstring) -> c.int --- 12 + } 13 + 7 14 Phase :: enum { 8 15 WORK, 9 16 BREAK, ··· 335 342 336 343 main :: proc() { 337 344 app := App { 338 - work_s = 25 * 60, 339 - break_s = 5 * 60, 345 + work_s = 2 * 60, 346 + break_s = 1 * 60, 340 347 phase = .WORK, 341 348 state = .IDLE, 342 349 accumulated = 0, ··· 419 426 app.accumulated = 0 420 427 app.start_ts = time.now() 421 428 dirty = true 429 + // Play sound.ogg at 20% volume using ffplay 430 + system("ffplay -nodisp -autoexit -volume 20 sound.ogg > /dev/null 2>&1 &") 422 431 } 423 432 } 424 433 // check if second changed (only re-render on tick)
nohup.out

This is a binary file and will not be displayed.

pomodoro

This is a binary file and will not be displayed.

sound.ogg

This is a binary file and will not be displayed.