summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Bright.hs
diff options
context:
space:
mode:
authorAlexander Shabalin <shabalyn.a@gmail.com>2014-09-24 12:31:54 +0400
committerAlexander Shabalin <shabalyn.a@gmail.com>2014-09-24 12:31:54 +0400
commitf8b7b22253d72b7b6ecf83bac87a8cda41040f49 (patch)
tree38705b1e87c9f8e7a74d8f2de502fec2c7de1725 /src/Plugins/Monitors/Bright.hs
parente26731b1fc292a16230f6517aa292dd3973929ae (diff)
downloadxmobar-f8b7b22253d72b7b6ecf83bac87a8cda41040f49.tar.gz
xmobar-f8b7b22253d72b7b6ecf83bac87a8cda41040f49.tar.bz2
Rename dynamic string to icon pattern
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