Skip to content

apostolicus/rgterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rgterm

A minimalist terminal emulator for muOS on Anbernic handheld devices, built from scratch in C with SDL2.

Completely vibe coded using Claude Opus 4.6 by Anthropic and Gemini 3.1 Pro by Google — zero prior SDL2 or PTY experience required.

rgterm screenshot

Features

  • Full VT100/ANSI escape sequence parser (colors, cursor movement, erase operations)
  • 256-color and truecolor (24-bit) support
  • On-screen keyboard (OSK) with 3 layers: abc, ABC, Ctrl
  • Scrollback buffer (500 lines, configurable)
  • Adaptive FPS (30 active / 5 idle) for battery efficiency
  • Blinking cursor with left/right navigation in shell input
  • muOS yellow color theme
  • Configurable via res/rgterm.ini
  • Runs /bin/bash with full PTY support

Tested on

Anbernic RG35XXSP running muOS 2601.1 Funky Jacaranda

May work on other muOS-supported devices, but is untested.

Controls

Button Action
X Toggle OSK (on-screen keyboard)
Select Enter / confirm command
B Backspace
L1 / R1 Switch OSK layer: abcABCCtrl
D-pad (OSK visible) Navigate OSK keys
D-pad UP/DOWN (OSK hidden) Scroll history
D-pad LEFT/RIGHT (OSK hidden) Move cursor in input line
Start Exit rgterm

OSK Layers

Layer Contents
abc Lowercase QWERTY + numbers + symbols
ABC Uppercase QWERTY + F1–F12 + Home/End/PgUp/PgDn
Ctrl Ctrl shortcuts (C-a through C-z, C-[, C-], etc.)

Installation

From release (recommended)

  1. Download rgterm.muxzip from the Releases page
  2. Copy it to /mnt/mmc/ARCHIVE/ on your device
  3. Open Applications → Archive Manager and install it
  4. Launch from Applications → rgterm

Manual installation

# Copy files to your device via SCP
scp -r rgterm res/font.ttf res/rgterm.ini mux_launch.sh \
    root@<device-ip>:/mnt/mmc/MUOS/application/rgterm/

Make sure the binary is executable:

chmod +x /mnt/mmc/MUOS/application/rgterm/rgterm
chmod +x /mnt/mmc/MUOS/application/rgterm/mux_launch.sh

Configuration

On first launch, res/rgterm.ini is created automatically with default values:

# rgterm configuration
font_path = res/font.ttf
font_size = 14
scrollback_lines = 500
fps_active = 30
fps_idle = 5
idle_timeout_ms = 500
fg_color = 255,200,0
bg_color = 0,0,0
shell = /bin/bash

Building from source

Requirements

  • gcc-aarch64-linux-gnu
  • SDL2 (aarch64)
  • SDL2_ttf (aarch64)
  • A monospace font at res/font.ttf (e.g. JetBrains Mono)

Quick build

# Install cross-compiler
sudo apt install gcc-aarch64-linux-gnu cmake make git

# Clone and build SDL2 + SDL2_ttf for aarch64
# (see BUILD.md for detailed instructions)

# Build rgterm
make clean && make

# Deploy to device
scp rgterm root@<device-ip>:/mnt/mmc/MUOS/application/rgterm/rgterm

See BUILD.md for full cross-compilation instructions.

Tips

  • Use /opt/muos/bin/fastfetch for system info (the fastfetch command alone may not be in PATH)
  • C-l clears the screen (Ctrl layer in OSK)
  • C-c interrupts a running command (Ctrl layer in OSK)
  • The scrollback buffer stores the last 500 lines — scroll up with D-pad when OSK is hidden

Limitations

  • Screen is 640×480 — some TUI applications (like htop) may not render perfectly
  • No mouse support
  • No alternate screen buffer (yet)

License

MIT — see LICENSE

Credits

Built for muOS — Custom Firmware for Anbernic handheld devices.

About

Minimalist terminal emulator for muOS on Anbernic handheld devices

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages