(load "~/quicklisp/setup.lisp") (ql:quickload :ltk) (use-package :ltk) (defun clear-screen() "Clears the screen in Linux" (sb-ext:run-program "clear" '() :output *standard-output* :search t :wait t)) (defun echo-durr() "Print to term" (sb-ext:run-program "echo" '("durr") :output *standard-output* :search t :wait t)) (with-ltk () (let ((button (make-instance 'button :text "hello" :command (lambda () (clear-screen)))) (button2 (make-instance 'button :text "durr" :command (lambda () (echo-durr)))) ;; Format doesn't seem to work until the gui ends ;; Turns out we need to add ~% (button3 (make-instance 'button :text "try format" :command (lambda () (format t "hi~%")))) (scroller (make-instance 'scrollbar ))) (grid button 0 0) (grid button2 0 1) (grid button3 0 5) ))