From 3d2af8a47332235d6556d2d2a40f7392269cf0b0 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 27 Oct 2013 16:20:25 +0100 Subject: New N/A string monitor option (cf. #119) --- src/Plugins/Monitors/Volume.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Plugins/Monitors/Volume.hs') diff --git a/src/Plugins/Monitors/Volume.hs b/src/Plugins/Monitors/Volume.hs index f3d0f4c..76831ff 100644 --- a/src/Plugins/Monitors/Volume.hs +++ b/src/Plugins/Monitors/Volume.hs @@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module : Plugins.Monitors.Volume --- Copyright : (c) 2011 Thomas Tuegel +-- Copyright : (c) 2011, 2013 Thomas Tuegel -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A. Ortega Ruiz @@ -135,7 +135,7 @@ runVolume mixerName controlName argv = do liftMaybe = fmap (liftM2 (,) (fmap fst) (fmap snd)) . sequenceA liftMonitor :: Maybe (Monitor String) -> Monitor String - liftMonitor Nothing = return unavailable + liftMonitor Nothing = unavailable liftMonitor (Just m) = m getDB :: Maybe Volume -> Monitor (Maybe Integer) @@ -152,11 +152,11 @@ runVolume mixerName controlName argv = do getSw (Just s) = io $ getChannel FrontLeft s getFormatDB :: VolumeOpts -> Maybe Integer -> Monitor String - getFormatDB _ Nothing = return unavailable + getFormatDB _ Nothing = unavailable getFormatDB opts (Just d) = formatDb opts d getFormatSwitch :: VolumeOpts -> Maybe Bool -> Monitor String - getFormatSwitch _ Nothing = return unavailable + getFormatSwitch _ Nothing = unavailable getFormatSwitch opts (Just sw) = formatSwitch opts sw - unavailable = "N/A" + unavailable = getConfigValue naString -- cgit v1.2.3