summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins
diff options
context:
space:
mode:
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