Monitor.icl 513 Bytes
Newer Older
1 2 3 4
module Monitor

import iTasks
import iTasksTTY
5
import Data.Either
6 7 8 9 10 11 12
import StdTuple

Start w = startEngine monitor w

monitor :: Task ()
monitor = enterTTYSettings <<@ ApplyLayout frameCompact
	>>! \ts->withShared ([], [], False) \channels->
13
			syncSerialChannel ts id (\s->(Right [s], "")) channels
14 15 16 17 18 19
		||- viewSharedInformation "Incoming messages" [ViewAs (take 20 o fst3)] channels
		||- forever (
			enterInformation "Send line of text" []
			>>= \line->upd (\(r,w,s)->(r,w++[line+++"\n"],s)) channels
		)
	@! ()