From 08ba2769abb7a36817a725d30d64cfd36f5bcf32 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 11 Mar 2022 08:35:55 -0600 Subject: separated app and lib modules, -osicat dep, +packages.lisp --- lib/term.lisp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/term.lisp (limited to 'lib/term.lisp') diff --git a/lib/term.lisp b/lib/term.lisp new file mode 100644 index 0000000..c5b472a --- /dev/null +++ b/lib/term.lisp @@ -0,0 +1,15 @@ +;;;; term.lisp -- functions for dealing with the terminal + + + +(in-package :oneliners.cli.term) + +(defvar *term-width* nil) + +(defun set-term-width () + ;; tput cols b/c getenv COLUMNS wasnt working on some terminals + (setf *term-width* + (- + (or (parse-integer (uiop:run-program '("tput" "cols") :output :string) :junk-allowed t) + 80) + 4))) -- cgit v1.2.3