Contents
-
Authors
-
Description
-
Arguments
-
Options in mpdknotifierrc file
-
Album art search algorithm
-
Troubleshooting
-
See also
-
Authors
Developer of MpdKNotifier v1.0: Jakub Horák kubahorak@gmail.com Further development: xaizek xaizek@gmail.com
- Description
This small program shows notifications with short information about current track of MPD using libnotify (http://www.galago-project.org/news/index.php). It can:
- display album art
- use external application to get cover (format is supported)
- resize album art if its bigger than needed
- display custom list of commands (format is supported)
-
Arguments
-d, --debug Use this argument to enable debug mode (which is disabled by default) if you want to see what happens at runtime. All debug messages will be printed out on stderr, not to log. So, you may want to redirect messages to a file like this:
mpdknotifier --debug 2> debug.out -
Options in mpdknotifierrc file
In configuration file mpdknotifierrc (that should be copied into ~/.kde/share/config/) in group "General" you can use options from the list below:
- MPDHost
- MPDPort
- MusicDir
- CommandsNames
- Commands
- Format
- ArtFindCmd
- LogFile
- PreferredCoverWidth
- PreferredCoverHeight
- ArtResizeCmd
- NoCoverImg
Note: There is a default value for each option. So you can skip some of theme in your configuration file. You can see them below in brackets after equals ('=') symbol. Here is full format of each entry: n) parameter_name [=default_value] Description.
-
MPDHost [=localhost] Sets IP address or DNS name of MPD server host and host password in the following format: [password@]host, where password is optional.
-
MPDPort [=6600] Sets number of port to connect to MPD server.
-
MusicDir [=/mnt/music/] Sets path to the music collection, should be same as one in mpd.conf. Needed for getting album art.
-
CommandsNames [=Open ncmpcpp] List of semicolon (';') separated command names.
-
Commands [=terminal -x ncmpcpp] List of semicolon (';') commands. Next special sequences can be used:
- '%a' - full path to album art
- '%f' - full path to current track
- '%d' - full path to parent directory of current track
- '%с' - name of album art file
- '%%' - percent symbol
-
Format [=%Artist% - %Title%{\n%Album%} {(%Date%)}] Format string for text message in the notification. You can use any tags that are supported by your version of MPD server. Just surround them with percent ('%') symbol. Also you can use conditional blocks using curly brackets ('{' and '}'). Conditional block will be displayed only if all tags it includes had been expanded. For additional formating HTML tags (, ,
, ...) and escape sequences ('\t', '\n', ...) can be used. But depending on your notify daemon you can use both types together or only one at a time. -
ArtFindCmd [=] If MPDKNotifier can't find album art, then this command is executed and search is repeated.
-
LogFile [=
/.mpdknotifier/log.txt] Log file name. You can use '' symbol to refer to your home directory. -
PreferredCoverWidth [=200] Preferred width of album art in pixels. This option is used for scaling album art and to decide if we need to call ArtResizeCmd.
-
PreferredCoverHeight [=200] Preferred height of album art in pixels. This option is also used for scaling album art and to decide if we need to call ArtResizeCmd.
-
ArtResizeCmd [=] Contains command for resizing images bigger than PreferredCoverWidth x PreferredCoverHeight. You can use all special sequences like in Commands option.
-
NoCoverImg [=/usr/share/apps/mpdknotifier/nocover.jpg] Path to the image file, that would be used when no cover was found.
- Album art search algorithm
Firstly a search for any jpg, png or gif file in parent directory of current track is performed. If we found nothing than executing command from ArtFindCmd option and repeating this algorithm from start (but only once). If we found only 1 image, then use it as a cover. Otherwise try to find best match. Perform the second search using next patterns: [fF]ront.jpg [fF]ront.png [cC]over.jpg [cC]over.png if we have matches take first of them and finish. Else perform third search with this patterns: [fF]ront.jpg [fF]ront.png [cC]over.jpg [cC]over.png if we found something take any of results and finish. Else take first image from results of first search.
- Troubleshooting
If you've found a bug or have some problems using this program, please inform the developers. Thus you can help to make this software better. If you have an account on GitHub.com you can create an issue there. Or you can always contact developers by email (see 'Authors' section).
- See also
For additional instructions: http://mpd.wikia.com/wiki/Client:MpdKNotifier
For latest version: https://github.com/xaizek/mpdknotifier
For homepage of original developer: http://zee.cz/