From afc503e0697046029a5fcbdfe313cbba302b8421 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 15 Jan 2011 00:50:18 +0100 Subject: Linting --- src/Plugins/Monitors/Volume.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Plugins/Monitors/Volume.hs b/src/Plugins/Monitors/Volume.hs index 0c5f92c..50a6ed4 100644 --- a/src/Plugins/Monitors/Volume.hs +++ b/src/Plugins/Monitors/Volume.hs @@ -14,7 +14,7 @@ module Plugins.Monitors.Volume (runVolume, volumeConfig) where -import Control.Monad ( liftM ) +import Control.Monad ( liftM, mplus ) import Data.Maybe import Plugins.Monitors.Common import Sound.ALSA.Mixer @@ -108,9 +108,9 @@ runVolume :: String -> String -> [String] -> Monitor String runVolume mixerName controlName argv = do opts <- io $ parseOpts argv control <- liftM fromJust $ io $ getControlByName mixerName controlName - let volumeControl = fromJust $ maybe (playback $ volume control) Just + let volumeControl = fromJust $ mplus (playback $ volume control) (common $ volume control) - switchControl = fromJust $ maybe (playback $ switch control) Just + switchControl = fromJust $ mplus (playback $ switch control) (common $ switch control) maybeNA = maybe (return "N/A") (lo, hi) <- io $ getRange volumeControl -- cgit v1.2.3