king: Factored all terminal rendering logic into its own module.
@@ -28,7 +28,6 @@ import Urbit.Vere.Http.Server (serv)
import Urbit.Vere.Log (EventLog)
import Urbit.Vere.Serf (Serf, SerfState(..), doJob, sStderr)
-import qualified System.Console.Terminal.Size as TSize
import qualified System.Entropy as Ent
import qualified Urbit.King.API as King
import qualified Urbit.Time as Time
@@ -37,6 +36,7 @@ import qualified Urbit.Vere.Serf as Serf
import qualified Urbit.Vere.Term as Term
import qualified Urbit.Vere.Term.API as Term
import qualified Urbit.Vere.Term.Demux as Term
+import qualified Urbit.Vere.Term.Render as Term
--------------------------------------------------------------------------------
@@ -225,7 +225,7 @@ pier (serf, log, ss) mStart = do
drivers inst ship (isFake logId)
(writeTQueue computeQ)
shutdownEvent
- (TSize.Window 80 24, muxed)
+ (Term.TSize{tsWide=80, tsTall=24}, muxed)
showErr
io $ atomically $ for_ bootEvents (writeTQueue computeQ)
@@ -286,7 +286,7 @@ data Drivers e = Drivers
drivers :: (HasLogFunc e, HasNetworkConfig e, HasPierConfig e)
=> KingId -> Ship -> Bool -> (Ev -> STM ())
-> STM()
- -> (TSize.Window Word, Term.Client)
+ -> (Term.TSize, Term.Client)
-> (Text -> RIO e ())
-> ([Ev], RAcquire e (Drivers e))
drivers inst who isFake plan shutdownSTM termSys stderr =
