| 1 | Jexer - Java Text User Interface library |
| 2 | ======================================== |
| 3 | |
| 4 | This library implements a text-based windowing system loosely |
| 5 | reminiscent of Borland's [Turbo |
| 6 | Vision](http://en.wikipedia.org/wiki/Turbo_Vision) system. It looks |
| 7 | like this: |
| 8 | |
| 9 | ![Several Windows Open Including A Terminal](/screenshots/screenshot1.png?raw=true "Several Windows Open Including A Terminal") |
| 10 | |
| 11 | Jexer works on both Xterm-like terminals and Swing, and supports |
| 12 | images 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 | |
| 16 | On 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 | |
| 22 | License |
| 23 | ------- |
| 24 | |
| 25 | Jexer is available to all under the MIT License. See the file LICENSE |
| 26 | for the full license text. |
| 27 | |
| 28 | |
| 29 | |
| 30 | Obtaining Jexer |
| 31 | --------------- |
| 32 | |
| 33 | Jexer is available on Maven Central: |
| 34 | |
| 35 | ```xml |
| 36 | <dependency> |
| 37 | <groupId>com.gitlab.klamonte</groupId> |
| 38 | <artifactId>jexer</artifactId> |
| 39 | <version>0.3.0</version> |
| 40 | </dependency> |
| 41 | ``` |
| 42 | |
| 43 | Binary releases are available on SourceForge: |
| 44 | https://sourceforge.net/projects/jexer/files/jexer/ |
| 45 | |
| 46 | The Jexer source code is hosted at: https://gitlab.com/klamonte/jexer |
| 47 | |
| 48 | |
| 49 | |
| 50 | Documentation |
| 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 | |
| 58 | |
| 59 | Programming Examples |
| 60 | -------------------- |
| 61 | |
| 62 | The examples/ folder currently contains: |
| 63 | |
| 64 | * A [prototype tiling window |
| 65 | manager](/examples/JexerTilingWindowManager.java) in less than 250 |
| 66 | lines of code. |
| 67 | |
| 68 | * A [prototype image thumbnail |
| 69 | viewer](/examples/JexerImageViewer.java) in less than 350 lines of |
| 70 | code. |
| 71 | |
| 72 | jexer.demos contains official demos showing all of the existing UI |
| 73 | controls. The demos can be run as follows: |
| 74 | |
| 75 | * 'java -jar jexer.jar' . This will use System.in/out with |
| 76 | Xterm-like sequences on non-Windows non-Mac platforms. On Windows |
| 77 | and Mac it will use a Swing JFrame. |
| 78 | |
| 79 | * 'java -Djexer.Swing=true -jar jexer.jar' . This will always use |
| 80 | Swing on any platform. |
| 81 | |
| 82 | * 'java -cp jexer.jar jexer.demos.Demo2 PORT' (where PORT is a |
| 83 | number to run the TCP daemon on). This will use the Xterm backend |
| 84 | on a telnet server that will update with screen size changes. |
| 85 | |
| 86 | * 'java -cp jexer.jar jexer.demos.Demo3' . This will use |
| 87 | System.in/out with Xterm-like sequences. One can see in the code |
| 88 | how to pass a different InputReader and OutputReader to |
| 89 | TApplication, permitting a different encoding than UTF-8. |
| 90 | |
| 91 | * 'java -cp jexer.jar jexer.demos.Demo4' . This demonstrates hidden |
| 92 | windows and a custom TDesktop. |
| 93 | |
| 94 | * 'java -cp jexer.jar jexer.demos.Demo5' . This demonstrates two |
| 95 | demo applications using different fonts in the same Swing frame. |
| 96 | |
| 97 | * 'java -cp jexer.jar jexer.demos.Demo6' . This demonstrates two |
| 98 | applications performing I/O across three screens: an Xterm screen |
| 99 | and Swing screen, monitored from a third Swing screen. |
| 100 | |
| 101 | |
| 102 | |
| 103 | More Screenshots |
| 104 | ---------------- |
| 105 | |
| 106 | ![Yo Dawg...](/screenshots/yodawg.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.") |
| 107 | |
| 108 | ![Sixel Pictures Of Cliffs Of Moher And Buoy](/screenshots/sixel_images.png?raw=true "Sixel Pictures Of Cliffs Of Moher And Buoy") |
| 109 | |
| 110 | ![Sixel Color Wheel](/screenshots/sixel_color_wheel.png?raw=true "Sixel Color Wheel") |
| 111 | |
| 112 | |
| 113 | |
| 114 | Terminal Support |
| 115 | ---------------- |
| 116 | |
| 117 | The table below lists terminals tested against Jexer's Xterm backend: |
| 118 | |
| 119 | | Terminal | Environment | Mouse Click | Mouse Cursor | Images | |
| 120 | | -------------- | ------------------ | ----------- | ------------ | ------ | |
| 121 | | xterm | X11 | yes | yes | yes | |
| 122 | | lcxterm(3) | CLI, Linux console | yes | yes | no | |
| 123 | | rxvt-unicode | X11 | yes | yes | no(2) | |
| 124 | | alacritty(3) | X11 | yes | yes | no | |
| 125 | | gnome-terminal | X11 | yes | yes | no | |
| 126 | | xfce4-terminal | X11 | yes | yes | no | |
| 127 | | mlterm | X11 | yes | yes | no(5) | |
| 128 | | aminal(3) | X11 | yes | no | no | |
| 129 | | konsole | X11 | yes | no | no | |
| 130 | | yakuake | X11 | yes | no | no | |
| 131 | | screen | CLI | yes(1) | yes(1) | no(2) | |
| 132 | | tmux | CLI | yes(1) | yes(1) | no | |
| 133 | | putty | X11, Windows | yes | no | no(2) | |
| 134 | | Linux | Linux console | no | no | no(2) | |
| 135 | | qodem(3) | CLI, Linux console | yes | yes(4) | no | |
| 136 | | qodem-x11(3) | X11 | yes | no | no | |
| 137 | |
| 138 | 1 - Requires mouse support from host terminal. |
| 139 | |
| 140 | 2 - Also fails to filter out sixel data, leaving garbage on screen. |
| 141 | |
| 142 | 3 - Latest in repository. |
| 143 | |
| 144 | 4 - Requires TERM=xterm-1003 before starting. |
| 145 | |
| 146 | 5 - Opening image crashes terminal. |
| 147 | |
| 148 | |
| 149 | |
| 150 | See Also |
| 151 | -------- |
| 152 | |
| 153 | * [Tranquil Java IDE](https://tjide.sourceforge.io) is a TUI-based |
| 154 | integrated development environment for the Java language that was |
| 155 | built using a very lightly modified GPL version of Jexer. TJ |
| 156 | provided a real-world use case to shake out numerous bugs and |
| 157 | limitations of Jexer. |
| 158 | |
| 159 | * [LCXterm](https://lcxterm.sourceforge.io) is a curses-based terminal |
| 160 | emulator that allows one to use Jexer with full support on the raw |
| 161 | Linux console. |
| 162 | |
| 163 | * [ptypipe](https://gitlab.com/klamonte/ptypipe) is a small C utility |
| 164 | that permits a Jexer TTerminalWindow to resize the running shell |
| 165 | when its window is resized. |
| 166 | |
| 167 | |
| 168 | |
| 169 | Acknowledgements |
| 170 | ---------------- |
| 171 | |
| 172 | Jexer makes use of the Terminus TrueType font [made available |
| 173 | here](http://files.ax86.net/terminus-ttf/) . |