PitchHut logo
A terminal music player with intuitive controls.
Pitch

tmuzika provides a fast and simple way to enjoy music directly from the terminal. Built with C, it leverages ncurses for a user-friendly interface and GStreamer for audio playback. With features like an integrated file manager and customizable playlists, tmuzika caters to both casual listeners and music enthusiasts.

Description

tmuzika is a terminal-based music player meticulously crafted in C, utilizing the power of ncurses for an intuitive user interface and GStreamer for seamless audio playback. This project aims to provide a fast and simple way to enjoy music directly from the command line, offering users complete keyboard control over their playback experience. User configuration and data are conveniently stored in ~/.tmuzika, ensuring a smooth setup and personalized usage.

Key Features

  • Terminal Music Playback: Enjoy a broad range of supported audio formats, including mp3, wav, flac, ogg, m4a, aac, and opus.
  • Radio Station Playback: Listen to your favorite radio stations directly through the terminal with ease.
  • Integrated File Manager: Manage your music files efficiently with features like copy, cut, paste, rename, delete, and undo, along with bookmark functionality for quick access.
  • Playlist Management: Save and load .m3u playlists and keep track of last played songs or radio stations.
  • Keyboard Navigation: Scroll through music and radio station lists using either keyboard or scroll wheel for enhanced convenience.

Key Bindings

Playback Controls:

KeyAction
ENTERPlay selected song
SPACEPause / Continue
b / nScroll left/right
zStop playback
> / <Next / Previous song
+ / -Volume up / down
<- / ->Jump ±10 seconds
HOME / ENDFirst / Last song
pRepeat song
lRepeat playlist
eShuffle
sSearch
mOpen File Manager
qSave playlist (.m3u)
uLoad playlist
vGo to current song
xDelete song from playlist
DELETEDelete all songs from playlist
kExit program

File Management Controls:

KeyAction
ENTEREnter directory/add song/add .m3u
BACKSPACEGo back
ctrl+hToggle hidden files
f / FAdd folder/add current folder
mSelect files/folders
ctrl+aSelect all files
dAdd multiple files
sSearch
nCreate new folder
tCreate new file
F2Rename file/folder
cCopy
xCut
vPaste
uUndo last action
DELETERemove file/folder
ctrl+bAdd bookmark
ctrl+dRemove bookmark
1-9Go to bookmark 1–9
ESCQuit file manager

CLI Usage

Launch tmuzika directly from the terminal:

# Play a song or playlist
$ tmuzika -p song.mp3
$ tmuzika --play song.mp3
$ tmuzika -p playlist.m3u
$ tmuzika --play playlist.m3u
$ tmuzika -p folder/
$ tmuzika --play folder/

# Play a radio station
$ tmuzika -r radio.mp3
$ tmuzika --radio radio.mp3
$ tmuzika -r http://radiostation
$ tmuzika --radio http://radiostation

# Display help
$ tmuzika -h
$ tmuzika --help

Conky Integration

Once tmuzika is running, it can write playback information to temporary files in /tmp, which allows integration with external tools like Conky to showcase the currently playing track on your desktop. For example:

/tmp/tmuzika_status
/tmp/tmuzika_title
/tmp/tmuzika_artist
/tmp/tmuzika_album
/tmp/tmuzika_track
/tmp/tmuzika_elapsed
/tmp/tmuzika_length

Troubleshooting

Ensure tmuzika is running, check the existence of /tmp/tmuzika_* files, and confirm the Conky update interval is properly set for a seamless experience.

0 comments

No comments yet.

Sign in to be the first to comment.