Trix Player (Rust TUI)
A fast, keyboard-driven terminal music player for Linux terminals (kitty, alacritty, foot, wezterm, etc.).
This project is built for people who hate GUIs and want a clean, responsive, “nvim-like” music experience:
- Rust +
ratatuiTUI (snappy redraws) rodioaudio playback with Symphonia decoding- Vim-ish, single-key controls + arrow-key seeking
- Track name + time/progress display
Status
Early but usable: it can scan a folder of audio files, play them, switch tracks, seek, and adjust volume.
Requirements (Linux)
- Rust toolchain (
cargo) - A working audio setup (ALSA / PipeWire / PulseAudio)
- System ALSA development headers (needed by
cpal/alsa-sys):- Debian/Ubuntu:
sudo apt install libasound2-dev - Fedora:
sudo dnf install alsa-lib-devel - Arch:
sudo pacman -S alsa-lib
- Debian/Ubuntu:
Build
This produces a short executable named trix:
Run
If you run without a path, it will try your Music directory (XDG XDG_MUSIC_DIR if set, else ~/Music), falling back to the current directory.
Play a directory (recursively scans for audio files):
Play a single file:
Start at a specific track index:
Supported formats
File extensions currently detected:
mp3,flac,wav,ogg,m4a,aac,opus
(Actual decode support is provided by Symphonia; the list above is just the library scan filter.)
Keybindings
Playback:
qquitSpacepause/resumePprevious trackNnext trackrrestart current track (play from start)lloop selected/current trackstoggle shuffle order
Seeking:
pseek -10snseek +10s←seek -5s→seek +5s
Volume:
vtoggle volume mode- While volume mode is ON:
↑volume up,↓volume down (Escexits)- Prefers controlling the ALSA system mixer when available; falls back to per-app gain.
Library:
↑/↓select trackEnterplay selectedSsearch (type to select;Enterplays;Esccancels)Ddelete selected track (press twice to confirm)
Notes on seeking
Seeking is implemented by restarting decoding at the new offset (simple and reliable). It’s usually fast, but very large files or some formats may seek less smoothly.
Troubleshooting
- No audio / ALSA error at startup: install the ALSA dev package for your distro (see Requirements) and ensure your system audio works outside this app.
- Terminal looks weird after crash: run
resetor restart the terminal.
Roadmap
Planned improvements:
- Better library UX: search/filter, sort by name/mtime, shuffle/repeat
- Metadata: show artist/album/title (tags)
- Real mixer volume (system volume) instead of per-app gain (implemented via native backends; falls back to app gain)
Platform support
Linux only.
License
MIT — see LICENSE.