summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-15 00:18:19 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-15 00:18:19 +0100
commit53d8d8f0c1b05365a6844b0fe665cbaadb599a98 (patch)
tree61cc05267163c70f94712bda19b4a9202c2f63e5 /src/Plugins
parentd1675af6f9749e12113d6bf957f920682e7fd91d (diff)
downloadxmobar-53d8d8f0c1b05365a6844b0fe665cbaadb599a98.tar.gz
xmobar-53d8d8f0c1b05365a6844b0fe665cbaadb599a98.tar.bz2
Nit
Diffstat (limited to 'src/Plugins')
-rw-r--r--src/Plugins/Monitors/Volume.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Plugins/Monitors/Volume.hs b/src/Plugins/Monitors/Volume.hs
index 72a9b0e..c0f97a6 100644
--- a/src/Plugins/Monitors/Volume.hs
+++ b/src/Plugins/Monitors/Volume.hs
@@ -20,6 +20,10 @@ import Plugins.Monitors.Common
import Sound.ALSA.Mixer
import System.Console.GetOpt
+volumeConfig :: IO MConfig
+volumeConfig = mkMConfig "Vol: <volume>% <status>" ["volume","dB","status"]
+
+
data VolumeOpts = VolumeOpts
{ onString :: String
, offString :: String
@@ -61,10 +65,6 @@ percent v' lo' hi' = (v - lo) / (hi - lo)
lo = fromIntegral lo'
hi = fromIntegral hi'
-volumeConfig :: IO MConfig
-volumeConfig = mkMConfig "Vol: <volume>% <status>"
- ["volume","dB","status"]
-
formatVol :: Integer -> Integer -> Integer -> Monitor String
formatVol v lo hi =
showPercentWithColors $ percent v lo hi