MCPcopy Index your code
hub / github.com/cosmos72/twin

github.com/cosmos72/twin @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
2,660 symbols 6,199 edges 383 files 487 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Twin - a Textmode WINdow environment

Version 0.9.1

Twin is text-based windowing environment with mouse support, window manager, truecolor terminal emulator, networked clients and the ability to attach/detach mode displays on-the-fly.

It supports a variety of displays: * plain text terminals: Linux console, twin's own terminal emulator, and any termcap/ncurses compatible terminal; * X11, where it can be used as a multi-window xterm; * itself (you can display a twin on another twin); * twdisplay, a general network-transparent display client, used to attach/detach more displays on-the-fly.

Currently, twin is tested on Linux (i386, x86_64, arm, arm64, PowerPC, Alpha, Sparc), on macOS (x86_64, arm64), on FreeBSD (i386, x86_64) and on Android (arm64 both on termux and UserLand). I had yet no chance to seriously test it on other systems.

The following screenshot shows an example of twin with various clients: screenshot_x11.png

Documentation

Tutorial A quite complete tour of twin features: the user interface, how to use twin clients, compression, attaching/detaching displays, fonts. It also contains installation instructions and some caveats for system administrators.

COPYING License: twin server and clients are GPL'ed software.

COPYING.LIB Library license: the libraries libtutf, libtw are LGPL'ed software.

INSTALL Quick compile/install guide.

twinrc A detailed example of ~/.config/twin/twinrc look-n-feel configuration file.

The following documentation is useful mostly to developers:

Configure Description of twin configuration options with the meaning of every single one.

README.git Hints to build twin from GIT repository.

README.porting Tips and warnings to compile twin on unsupported OSes.

libtw.txt reference API for programmers who want to write twin clients (INCOMPLETE).

libtw++.txt reference API for programmers who want to write twin C++ clients (INCOMPLETE).


Getting twin

Since you are reading this README, you probably already have it, anyway twin can be downloaded from

https://github.com/cosmos72/twin


Building and installing twin

For detailed instructions about compiling and installing twin, see sections 3 and 4 of the file docs/Tutorial

For the impatient, it basically reduces to

  ./configure
  make

then run as root

  make install

on Linux, also remember to run as root:

  ldconfig

on FreeBSD instead, remember to run as root:

  ldconfig -R

To compile twin you need the following programs installed on your system:

  • a Bourne-shell or compatible (for example bash, dash, ash...)

  • make (most variants are supported: GNU make, BSD make...)

  • an ANSI C compiler (for example gcc or clang)

  • a C++ 98 compiler (for example g++ or clang++)

Note: it is STRONGLY recommended to install at least the following packages before compiling twin (the exact names depend on the operating system or Linux distribution):

  • x11-dev - may be named x11-devel, libx11-dev ...
  • xft-dev - may be named xft-devel, libxft-dev ...
  • ncurses-dev - may be named ncurses-devel, libncurses-dev ...
  • zlib-dev - may be named zlib1g-dev, zlib-devel, libzlib-dev ...

On Linux, it is STRONGLY recommended to also install the following package before compiling twin:

  • gpm-dev - may be named gpm-devel, libgpm-dev ...

For a discussion about MANUALLY configuring twin (almost never necessary), see the file docs/Configure. -- WARNING: if you manually enable options that were disabled by `./configure', build will almost certainly fail! --


Other topics:

See the rest of the documentation, starting from the Tutorial

Greetings,

Massimiliano Ghilardi

Core symbols most depended-on inside this repo

log
called by 203
server/log.h
size
called by 184
libs/libtstl/fmt.cpp
Max2
called by 175
server/algo.h
Min2
called by 150
server/algo.h
data
called by 109
include/stl/utf8.h
CopyMem
called by 90
server/alloc.h
Push
called by 85
include/unaligned.h
_Tw_EncodeCall
called by 81
libs/libtw/libtw.c

Shape

Function 1,566
Method 732
Class 316
Enum 46

Languages

C++77%
C23%

Modules by API surface

include/Tw/Tw++.h271 symbols
libs/libtw/libtw.c174 symbols
server/socket.cpp117 symbols
libs/libtw/libtw2_gen.h81 symbols
server/rcparse.h73 symbols
server/tty.cpp67 symbols
server/util.cpp61 symbols
server/display.cpp60 symbols
libs/libltdl/ltdl.c59 symbols
server/hw/hw_tty_linux/kbd_raw1.h57 symbols
server/wm.cpp56 symbols
server/resize.cpp52 symbols

For agents

$ claude mcp add twin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page