Trix Player
A beautiful, keyboard-driven terminal music player for Linux.
Features • Installation • Usage • Building
Trix is a lightweight, high-performance music player built with Rust. It is designed for Linux users who prefer the terminal, offering a clean TUI (Terminal User Interface), robust keyboard navigation (vim-like), and low resource usage.
🎬 Demo
https://github.com/user-attachments/assets/4a7be924-2580-49d4-bd89-cddd8a084f2b
✨ Features
- Format Support: MP3, FLAC, WAV, OGG, M4A, AAC, Opus.
- Intuitive TUI: Clean interface built with
ratatui. - Volume Control: Native ALSA system volume control (with software fallback).
- Search: Fast, fuzzy-like filtering to find tracks instantly.
- Playback Control: Shuffle, Loop (track/playlist), and Seek.
- File Management: Delete tracks directly from the player.
- Standard Compliance: automatically detects music via
XDG_MUSIC_DIRor defaults to~/Music.
📦 Installation
Arch Linux (AUR)
Trix is available on the AUR as trix-player. Use your favorite AUR helper:
# or
Debian / Ubuntu
Download the latest .deb file from the Releases Page.
Fedora / RHEL / openSUSE
Download the latest .rpm file from the Releases Page.
Generic Linux (Binary)
Download the .tar.xz archive from the Releases page, extract it, and move the binary to your path.
One-line Install (curl)
Installs the latest x86_64-unknown-linux-gnu release into ~/.local/bin (or /usr/local/bin if run as root).
|
Install to a custom prefix:
| PREFIX=/usr/local
From Source (Rust)
If you have the Rust toolchain installed:
🚀 Usage
Run the player by typing:
By default, Trix looks for music in your XDG Music directory (usually ~/Music). You can also play a specific directory or file:
⚙️ Configuration
Trix can load a user config file from:
$XDG_CONFIG_HOME/trix/config.toml- or (fallback)
~/.config/trix/config.toml
Currently this is focused on theming colors.
Theme selection is intentionally not terminal-specific:
- Default theme: Atom Dark accents (standardized RGB colors) with terminal-default background
- Override: your config file values (deterministic, field-by-field)
For maximum consistency across terminals, prefer hex RGB colors (e.g. "#61afef").
Basic named colors (e.g. "cyan", "white") may still vary depending on your terminal’s ANSI palette.
Theme colors
Color values can be basic names (e.g. "cyan", "dark_gray") or hex RGB (e.g. "#61afef").
Important semantic constraint:
theme.library_accentis used for both the Library frame and the selection highlight. This is intentional so you can't configure the UI into a confusing state where “library color” and “selection color” drift apart.
Example ~/.config/trix/config.toml:
[]
# Global UI background
# Use "reset" (or omit this key) to respect your terminal background/transparency.
# Set a hex color (e.g. "#282c34") to force a solid UI background.
= "reset"
= "#61afef"
= "#56b6c2"
= "#98c379"
# Single knob: library frame + selection highlight
= "#e5c07b"
= "#61afef"
= "#98c379"
= "#c678dd"
= "#56b6c2"
= "#e5c07b"
= "#c678dd"
= "#e5c07b"
= "#abb2bf"
= "#5c6370"
= "#e06c75"
Keyboard Controls
Trix is designed to be used entirely without a mouse.
| Key | Action |
|---|---|
| Navigation | |
↑ |
Move selection up |
↓ |
Move selection down |
Enter |
Play selected track |
PgUp / PgDn |
Scroll page up/down |
| Playback | |
Space |
Pause / Resume |
N |
Play next track |
P |
Play previous track |
l |
Toggle Loop (Current track) |
s |
Toggle Shuffle |
r |
Restart current track |
| Seeking | |
→ |
Seek forward 5s (per press) |
← |
Seek backward 5s (per press) |
n |
Seek forward 10s |
p |
Seek backward 10s |
| Utility | |
S |
Search mode (Type to filter, Enter to play) |
m |
Move to timestamp (e.g. 1:30, 01:02:03) |
v |
Volume mode (Use ↑/↓ to adjust, v/Esc to exit) |
F12 |
Hide/Unhide Trix (shell; press again to return, or exit) |
D |
Delete track (Press twice to confirm) |
h / ? |
Toggle Help / Cheatsheet |
q |
Quit |
🔧 Dependencies
To build or run Trix, you need ALSA development libraries installed on your system.
- Debian/Ubuntu:
sudo apt install libasound2-dev - Fedora:
sudo dnf install alsa-lib-devel - Arch:
sudo pacman -S alsa-lib
🤝 Contributing
Contributions are welcome! Feel free to open issues for bugs or feature requests.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Known Bugs
- closing terminal results in 1 second lag of audio closure
- colors don't work properly need more standardization instead of terminal specific
📄 License
Distributed under the MIT License. See LICENSE for more information.
👤 Author
Riza Mohammad
- GitHub: @RIZAmohammadkhan