.gitignore | ||
commands.h | ||
config.h | ||
config.mk | ||
dirname.c | ||
dirname.h | ||
list.c | ||
list.h | ||
log.h | ||
loglevels.h | ||
Makefile | ||
pipe.c | ||
pipe.h | ||
pipeplayer.1 | ||
pipeplayer.c | ||
player.c | ||
player.h | ||
playlist.c | ||
playlist.h | ||
README.md | ||
threads.c | ||
threads.h |
Pipeplayer
Pipeplayer is a simple music daemon. It uses libmpg123 to decode files and libao to play sound. You can control it with named pipe (FIFO).
Before using this
This program requires playlist file which is plain text of songs in the same directory.
For example, you have folder with this files: song1.mp3
, song_2.mp3
, 4.mp3
and 56.mp3
.
Your playlist file shoul'd look like:
song1.mp3
song_2.mp3
4.mp3
56.mp3
Tip: cd into folder with music and run command ls -1N | tee playlist
to automatically generate playlist file. Note that order may differ.
Usage
First of all, you need to create named pipe (FIFO). It can be done by running following command:
mkfifo ~/.cache/.pipeplayer
Then, you can start daemon either during start of your desktop environment or window manager or even in tty with this command:
pipeplayer ~/.cache/.pipeplayer
Note: add &
at the end of command to run process in background.
Now you can send commands to created named pipe like this:
echo l$HOME/Music/playlist > ~/.cache/.pipeplayer
You can find all commands in man page, after installation you can run: man pipeplayer
Installation
You need a few things:
- git
- C compiler, such as gcc, clang or tcc
- make
- libmpg123
- libao
Install that stuff, clone this repository, cd into it and simply run make and sudo (or doas) make install:
git clone https://git.disroot.org/elijah.dev/pipeplayer.git
cd pipeplayer
make
sudo make install
If you prefer gcc, then run make CC=gcc
instead of make
.
Also, if you prefer clang, run make CC=clang STRIPFLAG=
Here some tips for installing dependencies on some distros:
Archlinux and arch-based distros
pacman -Syu --needed tcc mpg123 libao
Guides for other distibutions will appear in future. If you know one, feel free to add.
TODO
- Add pause command
- Add navigation inside song
Bugs
If you have found bugs, you can open issue or contact me via email elijah.dev@disroot.org