Music - ParanoidNemo/twolame GitHub Wiki
Music
The music applet check the status of mpd, show informations for the current song, like title, artist, cover etc and the current playlist. It creates three different fifo file into ~/.local/share/be.shell/fifo/ directory, one for current song info, one for playlist and one for cover.
Setting up the twolamerc section
First of all open the twolamerc file and check if the music thread is active (start_music = 1) under the twolame section; then move to the music section. Here you can change the update_period (in seconds) [I suggest a very little period right now, not above 5 seconds, if you want to have the player have a good respons; I'll add a listener for mpd changes ASAP and make this option deprecate], the mpd port (change only if you're using a port different that the default one) and the local path for the covers (the script check with this scheme: path/artist/album/cover.jpg)
Modify the format file
Music applet uses three different .format files:
- music.format is used to control the format of the current song infos.
- playlist.format is used to control the format of every single playlist entry.
- pl.format is instead used to generate a format for the entire playlist applet, separate the single elements and generate the overall table.
- cover.format is used to control the format of the cover
Create the be.shell entry
Add to the be.shell file one entry for every object you want to display.
[music]
Active=True
FiFo=/home/nemo/.local/share/be.shell/fifo/twolame_music
Lines=1
PermittedCommands=mpc toggle
Type=Label
[cover]
FiFo=/home/nemo/.local/share/be.shell/fifo/twolame_cover
Lines=1
Type=Label
[pl]
FiFo=/home/nemo/.local/share/be.shell/fifo/twolame_pl
Lines=1
Type=Label