summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Plugins/Monitors/Volume.hs6
1 files 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