xmonad-extras-0.9: Third party extensions for xmonad with wacky dependenciesSource codeContentsIndex
XMonad.Prompt.MPD
Portabilityunportable
Stabilityunstable
MaintainerDaniel Schoepe <daniel.schoepe@gmail.com>
Contents
Usage
Description
This module lets you select songs and add/play songs with MPD by filtering them by user-supplied criteria(E.g. ask for an artist, then for the album..)
Synopsis
findMatching :: RunMPD -> XPConfig -> [Song -> String] -> X [Song]
addMatching :: RunMPD -> XPConfig -> [Song -> String] -> X [PLIndex]
addAndPlay :: RunMPD -> XPConfig -> [Song -> String] -> X ()
type RunMPD = forall a. MPD a -> IO (Response a)
findOrAdd :: Song -> MPD PLIndex
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.sgArtist, MPD.sgAlbum] >> return ()

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" 666 (return $ Just $ "password")) ..
findMatching :: RunMPD -> XPConfig -> [Song -> String] -> X [Song]Source
Lets the user filter out non-matching with a prompt by supplied criteria.
addMatching :: RunMPD -> XPConfig -> [Song -> String] -> X [PLIndex]Source
Add all selected songs to the playlist if they are not on it.
addAndPlay :: RunMPD -> XPConfig -> [Song -> String] -> X ()Source
Add matching songs and play the first one.
type RunMPD = forall a. MPD a -> IO (Response a)Source
Allows the user to supply a custom way to connect to MPD (e.g. partially applied withMPDEx).
findOrAdd :: Song -> MPD PLIndexSource
Determine playlist position of the song and add it, if it isn't present.
Produced by Haddock version 2.6.0