From ce23b849f7aff963a1e6a84da5281b6a4aaff241 Mon Sep 17 00:00:00 2001
From: Jose Antonio Ortega Ruiz <jao@gnu.org>
Date: Sat, 15 Jan 2011 00:03:43 +0100
Subject: Volume monitor: minor linting and file header

---
 src/Plugins/Monitors/Volume.hs | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

(limited to 'src')

diff --git a/src/Plugins/Monitors/Volume.hs b/src/Plugins/Monitors/Volume.hs
index 380df30..72a9b0e 100644
--- a/src/Plugins/Monitors/Volume.hs
+++ b/src/Plugins/Monitors/Volume.hs
@@ -1,3 +1,17 @@
+-----------------------------------------------------------------------------
+-- |
+-- Module      :  Plugins.Monitors.Volume
+-- Copyright   :  (c) 2011 Thomas Tuegel
+-- License     :  BSD-style (see LICENSE)
+--
+-- Maintainer  :  Jose A. Ortega Ruiz <jao@gnu.org>
+-- Stability   :  unstable
+-- Portability :  unportable
+--
+-- A monitor for ALSA soundcards
+--
+-----------------------------------------------------------------------------
+
 module Plugins.Monitors.Volume (runVolume, volumeConfig) where
 
 import Control.Monad ( liftM )
@@ -60,9 +74,9 @@ switchHelper :: VolumeOpts
              -> (VolumeOpts -> String)
              -> Monitor String
 switchHelper opts cHelp strHelp = return $
-    (colorHelper $ cHelp opts)
+    colorHelper (cHelp opts)
     ++ strHelp opts
-    ++ (maybe "" (const "</fc>") $ cHelp opts)
+    ++ maybe "" (const "</fc>") (cHelp opts)
 
 formatSwitch :: VolumeOpts -> Bool -> Monitor String
 formatSwitch opts True = switchHelper opts onColor onString
@@ -95,7 +109,7 @@ runVolume mixerName controlName argv = do
     (lo, hi) <- io $ getRange volumeControl
     val <- io $ getChannel FrontLeft $ value volumeControl
     db <- io $ getChannel FrontLeft $ dB volumeControl
-    sw <- io $ getChannel FrontLeft $ switchControl
+    sw <- io $ getChannel FrontLeft switchControl
     p <- case val of
              Just x -> formatVol x lo hi
              Nothing -> formatVol hi lo hi
@@ -105,4 +119,4 @@ runVolume mixerName controlName argv = do
     s <- case sw of
              Just x -> formatSwitch opts x
              Nothing -> formatSwitch opts True
-    parseTemplate $ [ p, d, s ] 
+    parseTemplate [ p, d, s ]
-- 
cgit v1.2.3