Spin.start: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/share/spin.bend as Spin Lines 24-32 of ezx@1.11.0.0/src/share/spin.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/share/spin.bend&start_line=24&end_line=32 import Base import snap@1.4.0.0/main.bend as R import ezx@1.11.0.0/src/share/say.bend as Say # the mark, when there is a terminal to draw it on def start(on: Bool, +dev: String, +msg: String) -> IO(Say.Spin): match on: case False{}: IO.pure(Say.Spin, Say.Spin{"", "", ""}) case True{}: do IO: +pid : String <- R.start(["sh", "-c", Say.frames(), "sh", dev, msg]) return Say.Spin{dev, String.trim(pid), msg} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.trim https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/say.bend&name=Spin https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/say.bend&name=frames https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=start