diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-10-27 16:20:25 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-10-27 16:20:25 +0100 |
commit | 3d2af8a47332235d6556d2d2a40f7392269cf0b0 (patch) | |
tree | 75f75e4dd2bbae0106b77e333213ee6c9b6d4754 /src/Plugins/Monitors/Volume.hs | |
parent | 7e89ff8e2007e057a0b00a5a9c1fd953c565db25 (diff) | |
download | xmobar-3d2af8a47332235d6556d2d2a40f7392269cf0b0.tar.gz xmobar-3d2af8a47332235d6556d2d2a40f7392269cf0b0.tar.bz2 |
New N/A string monitor option (cf. #119)
Diffstat (limited to 'src/Plugins/Monitors/Volume.hs')
-rw-r--r-- | src/Plugins/Monitors/Volume.hs | 10 |
1 files changed, 5 insertions, 5 deletions
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 <jao@gnu.org> @@ -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 |