Portability | unportable |
---|---|
Stability | unstable |
Maintainer | Daniel Schoepe <daniel.schoepe@googlemail.com> |
This module lets the user select songs and have MPD add/play them by filtering them by user-supplied criteria(E.g. ask for an artist, then for the album..)
Usage
To use this, import the following modules:
import XMonad.Prompt.MPD import qualified Network.MPD as MPD
You can then use this in a keybinding, to filter first by artist, then by album and add the matching songs:
addMatching MPD.withMPD defaultXPConfig [MPD.Artist, MPD.Album] >> return ()
That way you will first be asked for an artist name, then for an album by that artist etc..
If you need a password to connect to your MPD or need a different host/port, you can pass a partially applied withMPDEx to the function:
addMatching (MPD.withMPDEx "your.host" 4242 "very secret") ..
findMatching :: RunMPD -> XPConfig -> [Metadata] -> X [Song]Source
Lets the user filter out non-matching songs. For example, if given [Artist, Album] as third argument, this will prompt the user for an artist(with tab-completion), then for an album by that artist and then returns the songs from that album.
addMatching :: RunMPD -> XPConfig -> [Metadata] -> X [Int]Source
Add all selected songs to the playlist if they are not in it.
addAndPlay :: RunMPD -> XPConfig -> [Metadata] -> X ()Source
Add matching songs and play the first one.