2
7
Fork
You've already forked cl-tmode
0
Text mode ANSI-sequence based API for Common Lisp
  • Common Lisp 99.4%
  • C++ 0.4%
  • C 0.2%
Find a file
2026年07月14日 00:39:57 +02:00
examples Replaced c bindings with sbcl native functions for termios 2026年07月04日 12:01:05 +02:00
src button-panel: inherit parent background when changing parent 2026年07月14日 00:39:57 +02:00
.gitignore Updated .gitignore file 2026年04月11日 11:08:30 +02:00
LICENSE.txt Updated readme and added license 2026年04月22日 19:47:04 +02:00
lw.bat Added win32 stuff 2026年02月12日 19:37:56 +01:00
lw.sh Fixed unicode input; last character in edit was not returned 2026年03月22日 14:29:22 +01:00
README.md Restructured readme 2026年06月11日 01:03:40 +02:00
tmode.asd Fix the situations when the application doesn't have any windows accepting focus, 2026年07月02日 14:46:32 +02:00

TMode

Introduction

TMode is a library for creating text-mode user interfaces in Common Lisp. This is very much WIP project, so do not use it for anything serious unless you are ready to debug it.

It supports output to CAPI windows and ansi-compatible terminals (i.e. xterm, konsole etc).

The goal is to easily create simple interfaces for console applications in Common Lisp, which might still require some basic components like listboxes, text views, checkboxes, buttons, radiobuttons, etc as well as some basic layouts and a sane input model.

Screenshots

screenshot1 screenshot2 screenshot2 screenshot2

Requirements

Supported compilers: SBCL and Lispworks. By design it is a zero-dependency library, no ncurses, cffi or anything required. Just drag'n'drop it as a dependency to a project and ready to go. Tested terminals: urxvt, Konsole, Gnome Terminal. This is what I mostly use, so I've targeted them.

Supported features

  • Ansi terminal output, 3-bit, 8-bit, 24-bit colors
  • Key input including special keys like F1-F12(not all ctrl/alt combos are supported, due to ancient unix terminal input system and my laziness)
  • Windows, including decorated (with border and title) and child windows
  • Hiding/showing windows, enabling/disabling
  • Panels:
    • checkbox-button-panel
    • radio-button-panel
    • push-button-panel
  • Scrollable text window
  • Simple BBCode-based markup language for text windows
  • Listboxes
  • Tables with headers and rows, with possibility to select cells or rows
  • Focus transition by tab or up/down arrows(for panels)
  • Text input fields (edit)
  • Layouts: row-layout and column-layout, including layouts nesting
  • Dialogs: windows with buttons and layout
  • Accelerator keys for buttons (parsed from "&" character in a name)
  • Top menu with submenus

Examples

Take a look at files in examples directory.

LLM statement

  • This is a strictly personal no-LLM project; no LLMs were involved in the process, and I prefer to keep it that way. Since I cannot guarantee that the contributors' code is free from LLM involvement, no contributions are accepted, unless I know the contributer and he shares the same views on a project.
  • Neither is accepted to train LLM on the code of the project.

TODO

  • Robust key handling
  • Correct window resize handling
  • Windows console backend
  • More components