(use extras ;; for pp posix) ;; for call-with-input-pipe (define (terminal-dimensions) (call-with-input-pipe "stty size" (lambda (port) (cons (read port) (read port))))) (pp (terminal-dimensions))