From 8d3743e40a26e5c75b4ae53468e1384e38f86a0f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 15 Mar 2011 22:27:22 -0400 Subject: Use the environment to configure the MPD server --- src/Plugins/Monitors/MPD.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/Plugins') diff --git a/src/Plugins/Monitors/MPD.hs b/src/Plugins/Monitors/MPD.hs index daf0ed4..f17e6c5 100644 --- a/src/Plugins/Monitors/MPD.hs +++ b/src/Plugins/Monitors/MPD.hs @@ -40,9 +40,6 @@ defaultOpts = MOpts { mPlaying = ">>" , mStopped = "><" , mPaused = "||" - , mHost = "127.0.0.1" - , mPort = 6600 - , mPassword = "" } options :: [OptDescr (MOpts -> MOpts)] @@ -50,15 +47,12 @@ options = [ Option "P" ["playing"] (ReqArg (\x o -> o { mPlaying = x }) "") "" , Option "S" ["stopped"] (ReqArg (\x o -> o { mStopped = x }) "") "" , Option "Z" ["paused"] (ReqArg (\x o -> o { mPaused = x }) "") "" - , Option "h" ["host"] (ReqArg (\x o -> o { mHost = x }) "") "" - , Option "p" ["port"] (ReqArg (\x o -> o { mPort = read x }) "") "" - , Option "x" ["password"] (ReqArg (\x o -> o { mPassword = x }) "") "" ] runMPD :: [String] -> Monitor String runMPD args = do opts <- io $ mopts args - let mpd = M.withMPDEx (mHost opts) (mPort opts) (mPassword opts) + let mpd = M.withMPD status <- io $ mpd M.status song <- io $ mpd M.currentSong s <- parseMPD status song opts -- cgit v1.2.3