summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Bright.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins/Monitors/Bright.hs')
-rw-r--r--src/Plugins/Monitors/Bright.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Plugins/Monitors/Bright.hs b/src/Plugins/Monitors/Bright.hs
index 999b459..cb510f6 100644
--- a/src/Plugins/Monitors/Bright.hs
+++ b/src/Plugins/Monitors/Bright.hs
@@ -26,22 +26,22 @@ import Plugins.Monitors.Common
data BrightOpts = BrightOpts { subDir :: String
, currBright :: String
, maxBright :: String
- , curBrightDynamicString :: Maybe DynamicString
+ , curBrightIconPattern :: Maybe IconPattern
}
defaultOpts :: BrightOpts
defaultOpts = BrightOpts { subDir = "acpi_video0"
, currBright = "actual_brightness"
, maxBright = "max_brightness"
- , curBrightDynamicString = Nothing
+ , curBrightIconPattern = Nothing
}
options :: [OptDescr (BrightOpts -> BrightOpts)]
options = [ Option "D" ["device"] (ReqArg (\x o -> o { subDir = x }) "") ""
, Option "C" ["curr"] (ReqArg (\x o -> o { currBright = x }) "") ""
, Option "M" ["max"] (ReqArg (\x o -> o { maxBright = x }) "") ""
- , Option "" ["brightness-dynamic-string"] (ReqArg (\x o ->
- o { curBrightDynamicString = Just $ parseDynamicString x }) "") ""
+ , Option "" ["brightness-icon-pattern"] (ReqArg (\x o ->
+ o { curBrightIconPattern = Just $ parseIconPattern x }) "") ""
]
-- from Batt.hs
@@ -56,7 +56,7 @@ sysDir = "/sys/class/backlight/"
brightConfig :: IO MConfig
brightConfig = mkMConfig "<percent>" -- template
- ["vbar", "percent", "bar", "dstr"] -- replacements
+ ["vbar", "percent", "bar", "ipat"] -- replacements
data Files = Files { fCurr :: String
, fMax :: String
@@ -85,7 +85,7 @@ runBright args = do
fmtPercent opts c = do r <- showVerticalBar (100 * c) c
s <- showPercentWithColors c
t <- showPercentBar (100 * c) c
- d <- showDynamicString (curBrightDynamicString opts) c
+ d <- showIconPattern (curBrightIconPattern opts) c
return [r,s,t,d]
readBright :: Files -> IO Float