experimental 24-bit image protocol
[nikiroo-utils.git] / README.md
... / ...
CommitLineData
1Jexer - Java Text User Interface library
2========================================
3
4This library implements a text-based windowing system loosely
5reminiscent of Borland's [Turbo
6Vision](http://en.wikipedia.org/wiki/Turbo_Vision) system. It looks
7like this:
8
9![Terminal, Image, Table](/screenshots/new_demo1.png?raw=true "Terminal, Image, Table")
10
11Jexer works on both Xterm-like terminals and Swing, and supports
12images in both Xterm and Swing. On Swing, images are true color:
13
14![Swing Snake Image](/screenshots/snake_swing.png?raw=true "Swing Snake Image")
15
16On Xterm, images are dithered to a common palette:
17
18![Xterm Snake Image](/screenshots/snake_xterm.png?raw=true "Xterm Snake Image")
19
20
21
22License
23-------
24
25Jexer is available to all under the MIT License. See the file LICENSE
26for the full license text.
27
28
29
30Obtaining Jexer
31---------------
32
33Jexer is available on Maven Central:
34
35```xml
36<dependency>
37 <groupId>com.gitlab.klamonte</groupId>
38 <artifactId>jexer</artifactId>
39 <version>0.3.2</version>
40</dependency>
41```
42
43Binary releases are available on SourceForge:
44https://sourceforge.net/projects/jexer/files/jexer/
45
46The Jexer source code is hosted at: https://gitlab.com/klamonte/jexer
47
48
49
50Documentation
51-------------
52
53* [Java API Docs](https://jexer.sourceforge.io/apidocs/api/index.html)
54
55* [Wiki](https://gitlab.com/klamonte/jexer/wikis/home)
56
57* [Jexer web page](https://jexer.sourceforge.io/)
58
59
60
61Programming Examples
62--------------------
63
64The examples/ folder currently contains:
65
66 * A [prototype tiling window
67 manager](/examples/JexerTilingWindowManager.java) in less than 250
68 lines of code.
69
70 * A much slicker [prototype tiling window
71 manager](/examples/JexerTilingWindowManager2.java) in less than 200
72 lines of code.
73
74 * A [prototype image thumbnail
75 viewer](/examples/JexerImageViewer.java) in less than 350 lines of
76 code.
77
78jexer.demos contains official demos showing all of the existing UI
79controls. The demos can be run as follows:
80
81 * 'java -jar jexer.jar' . This will use System.in/out with
82 Xterm-like sequences on non-Windows non-Mac platforms. On Windows
83 and Mac it will use a Swing JFrame.
84
85 * 'java -Djexer.Swing=true -jar jexer.jar' . This will always use
86 Swing on any platform.
87
88 * 'java -cp jexer.jar jexer.demos.Demo2 PORT' (where PORT is a
89 number to run the TCP daemon on). This will use the Xterm backend
90 on a telnet server that will update with screen size changes.
91
92 * 'java -cp jexer.jar jexer.demos.Demo3' . This will use
93 System.in/out with Xterm-like sequences. One can see in the code
94 how to pass a different InputReader and OutputReader to
95 TApplication, permitting a different encoding than UTF-8.
96
97 * 'java -cp jexer.jar jexer.demos.Demo4' . This demonstrates hidden
98 windows and a custom TDesktop.
99
100 * 'java -cp jexer.jar jexer.demos.Demo5' . This demonstrates two
101 demo applications using different fonts in the same Swing frame.
102
103 * 'java -cp jexer.jar jexer.demos.Demo6' . This demonstrates two
104 applications performing I/O across three screens: an Xterm screen
105 and Swing screen, monitored from a third Swing screen.
106
107 * 'java -cp jexer.jar jexer.demos.Demo7' . This demonstrates the
108 BoxLayoutManager, achieving a similar result as the
109 javax.swing.BoxLayout apidocs example.
110
111
112
113More Screenshots
114----------------
115
116Jexer can be run inside its own terminal window, with support for all
117of its features including images and mouse, and more terminals:
118
119![Yo Dawg...](/screenshots/jexer_sixel_in_sixel.png?raw=true "Yo Dawg, I heard you like text windowing systems, so I ran a text windowing system inside your text windowing system so you can have a terminal in your terminal.")
120
121Sixel output uses a single palette which works OK for a variety of
122real-world images:
123
124![Sixel Pictures Of Cliffs Of Moher And Buoy](/screenshots/sixel_images.png?raw=true "Sixel Pictures Of Cliffs Of Moher And Buoy")
125
126The color wheel with that palette is shown below:
127
128![Sixel Color Wheel](/screenshots/sixel_color_wheel.png?raw=true "Sixel Color Wheel")
129
130
131
132Terminal Support
133----------------
134
135The table below lists terminals tested against Jexer's Xterm backend:
136
137| Terminal | Environment | Mouse Click | Mouse Cursor | Images |
138| -------------- | ------------------ | ----------- | ------------ | ------ |
139| xterm | X11 | yes | yes | yes |
140| jexer | CLI, X11, Windows | yes | yes | yes |
141| mlterm | X11 | yes | yes | yes |
142| RLogin | Windows | yes | yes | yes |
143| alacritty(3) | X11 | yes | yes | no |
144| gnome-terminal | X11 | yes | yes | no |
145| iTerm2 | Mac | yes | yes | no(5) |
146| kitty(3) | X11 | yes | yes | no |
147| lcxterm(3) | CLI, Linux console | yes | yes | no |
148| mintty | Windows | yes | yes | no(5) |
149| rxvt-unicode | X11 | yes | yes | no(2) |
150| xfce4-terminal | X11 | yes | yes | no |
151| aminal(3) | X11 | yes | no | no |
152| konsole | X11 | yes | no | no |
153| yakuake | X11 | yes | no | no |
154| Windows Terminal(6) | Windows | no | no | no(2) |
155| screen | CLI | yes(1) | yes(1) | no(2) |
156| tmux | CLI | yes(1) | yes(1) | no |
157| putty | X11, Windows | yes | no | no(2) |
158| Linux | Linux console | no | no | no(2) |
159| qodem(3) | CLI, Linux console | yes | yes(4) | no |
160| qodem-x11(3) | X11 | yes | no | no |
161| yaft | Linux console (FB) | no | no | yes |
162
1631 - Requires mouse support from host terminal.
164
1652 - Also fails to filter out sixel data, leaving garbage on screen.
166
1673 - Latest in repository.
168
1694 - Requires TERM=xterm-1003 before starting.
170
1715 - Sixel images can crash terminal.
172
1736 - Version 0.4.2382.0, on Windows 10.0.18362.30. Tested against
174 WSL-1 Debian instance.
175
176
177
178See Also
179--------
180
181* [Tranquil Java IDE](https://tjide.sourceforge.io) is a TUI-based
182 integrated development environment for the Java language that was
183 built using a very lightly modified GPL version of Jexer. TJ
184 provided a real-world use case to shake out numerous bugs and
185 limitations of Jexer.
186
187* [LCXterm](https://lcxterm.sourceforge.io) is a curses-based terminal
188 emulator that allows one to use Jexer with full support on the raw
189 Linux console.
190
191* [ptypipe](https://gitlab.com/klamonte/ptypipe) is a small C utility
192 that permits a Jexer TTerminalWindow to resize the running shell
193 when its window is resized.
194
195
196
197Acknowledgements
198----------------
199
200Jexer makes use of the Terminus TrueType font [made available
201here](http://files.ax86.net/terminus-ttf/) .