aboutsummaryrefslogtreecommitdiff
path: root/lib/term.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/term.lisp')
-rw-r--r--lib/term.lisp15
1 files changed, 15 insertions, 0 deletions
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)))