summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Volume.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2013-10-27 16:20:25 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-10-27 16:20:25 +0100
commit3d2af8a47332235d6556d2d2a40f7392269cf0b0 (patch)
tree75f75e4dd2bbae0106b77e333213ee6c9b6d4754 /src/Plugins/Monitors/Volume.hs
parent7e89ff8e2007e057a0b00a5a9c1fd953c565db25 (diff)
downloadxmobar-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.hs10
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