aboutsummaryrefslogtreecommitdiff
path: root/lib/term.lisp
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-03-11 08:35:55 -0600
committerColin Okay <okay@toyful.space>2022-03-11 08:35:55 -0600
commit08ba2769abb7a36817a725d30d64cfd36f5bcf32 (patch)
tree3068a5d9e1a4afd06a5f8b236658d4094e30dfef /lib/term.lisp
parent62afeb3f21d3d8e8db045a001271e686e944a049 (diff)
separated app and lib modules, -osicat dep, +packages.lisp
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)))