Terminal styling and layout widgets
0

Configure Feed

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

console: use Eio for terminal window size

+2 -1
+2 -1
lib/eio/terminal.ml
··· 1 1 let usable_width w = if w > 10 then Some w else None 2 + let err_msg fmt = Fmt.kstr (fun msg -> Error (`Msg msg)) fmt 2 3 3 4 let width_of_ioctl () = 4 5 try (Eio_unix.Pty.get_window_size Eio_unix.Fd.stdout).cols |> usable_width ··· 129 130 loop ())) 130 131 with 131 132 | Unix.Unix_error (e, fn, arg) -> 132 - Error (`Msg (Fmt.str "%s(%s): %s" fn arg (Unix.error_message e))) 133 + err_msg "%s(%s): %s" fn arg (Unix.error_message e) 133 134 | End_of_file -> Error (`Msg "terminal output closed while prompting")