gitmyhub

xteink-terminal

C++ ★ 19 updated 25d ago

Custom firmware and a tmux bridge for using an XTeInk X4 as a small Wi-Fi e-ink terminal display.

Turns an XTeInk X4 e-ink keyboard accessory into a wireless secondary terminal display by flashing custom firmware and running a Python tmux bridge on your computer.

C++PythonArduinoPlatformIOESP32HTTPtmuxsetup: hardcomplexity 4/5

This project turns an XTeInk X4, a small device with an e-ink screen, into a wireless terminal display. The idea is that your keyboard stays connected to your main computer as normal, your terminal sessions run on your main computer, and whatever appears in those sessions is transmitted over Wi-Fi and shown on the X4's e-ink screen as a secondary display.

The project has two main parts. The first is custom firmware that replaces the software that came installed on the X4. The X4 contains an ESP32-C3 chip, a small microcontroller, and the replacement firmware is built using Arduino and PlatformIO (common tools in the hardware hobbyist world). This new firmware strips out the device's original reader functions and instead sets up a small web server that accepts screen content as JSON over HTTP. When you first start the device without Wi-Fi configured, it creates its own temporary wireless network so you can connect and tell it which Wi-Fi network to join.

The second part is a Python script that runs on your computer. It connects to tmux, a terminal multiplexer that lets you run multiple terminal sessions at once, reads the current contents of a terminal pane as plain text, and periodically pushes updates to the X4 over Wi-Fi. The script handles things like converting special box-drawing characters to simpler ASCII and wrapping long lines to fit the display.

The e-ink display on the X4 is not an ordinary screen. It refreshes slowly: a full screen refresh takes roughly 1.7 seconds, and even partial refreshes are noticeably slower than a regular monitor. The firmware tries to minimize full refreshes by only updating the parts of the screen that changed. This makes the device practical for showing slowly changing information like a running log, a system status panel, or a text file, but not for fast-scrolling output.

The README is clear that this is experimental firmware. The author recommends backing up the original firmware before flashing, since the project replaces the stock software entirely.

Where it fits