summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Plugins/Monitors/Common.hs24
-rw-r--r--README1
2 files changed, 15 insertions, 10 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs
index 6729397..2d35a71 100644
--- a/Plugins/Monitors/Common.hs
+++ b/Plugins/Monitors/Common.hs
@@ -132,21 +132,23 @@ data Opts = HighColor String
| PercentPad String
| MinWidth String
| MaxWidth String
+ | Width String
| PadChars String
| PadAlign String
options :: [OptDescr Opts]
options =
- [ Option ['H'] ["High"] (ReqArg High "number" ) "The high threshold"
- , Option ['L'] ["Low"] (ReqArg Low "number" ) "The low threshold"
- , Option ['h'] ["high"] (ReqArg HighColor "color number" ) "Color for the high threshold: ex \"#FF0000\""
- , Option ['n'] ["normal"] (ReqArg NormalColor "color number" ) "Color for the normal threshold: ex \"#00FF00\""
- , Option ['l'] ["low"] (ReqArg LowColor "color number" ) "Color for the low threshold: ex \"#0000FF\""
- , Option ['t'] ["template"] (ReqArg Template "output template" ) "Output template."
- , Option ['p'] ["ppad"] (ReqArg PercentPad "percent padding" ) "Minimum percentage width."
- , Option ['m'] ["minwidth"] (ReqArg MinWidth "minimum width") "Minimum field width"
- , Option ['M'] ["maxwidth"] (ReqArg MaxWidth "maximum width") "Maximum field width"
- , Option ['c'] ["padchars"] (ReqArg PadChars "padding chars") "Characters to use for padding"
+ [ Option ['H'] ["High"] (ReqArg High "number" ) "The high threshold"
+ , Option ['L'] ["Low"] (ReqArg Low "number" ) "The low threshold"
+ , Option ['h'] ["high"] (ReqArg HighColor "color number" ) "Color for the high threshold: ex \"#FF0000\""
+ , Option ['n'] ["normal"] (ReqArg NormalColor "color number" ) "Color for the normal threshold: ex \"#00FF00\""
+ , Option ['l'] ["low"] (ReqArg LowColor "color number" ) "Color for the low threshold: ex \"#0000FF\""
+ , Option ['t'] ["template"] (ReqArg Template "output template" ) "Output template."
+ , Option ['p'] ["ppad"] (ReqArg PercentPad "percent padding") "Minimum percentage width."
+ , Option ['m'] ["minwidth"] (ReqArg MinWidth "minimum width" ) "Minimum field width"
+ , Option ['M'] ["maxwidth"] (ReqArg MaxWidth "maximum width" ) "Maximum field width"
+ , Option ['w'] ["width"] (ReqArg Width "fixed width" ) "Fixed field width"
+ , Option ['c'] ["padchars"] (ReqArg PadChars "padding chars" ) "Characters to use for padding"
, Option ['a'] ["align"] (ReqArg PadAlign "padding alignment") "'l' for left padding, 'r' for right"
]
@@ -174,6 +176,8 @@ doConfigOptions (o:oo) =
PercentPad p -> setConfigValue (nz p) ppad >> next
MinWidth mn -> setConfigValue (nz mn) minWidth >> next
MaxWidth mx -> setConfigValue (nz mx) maxWidth >> next
+ Width w -> setConfigValue (nz w) minWidth >>
+ setConfigValue (nz w) maxWidth >> next
PadChars pc -> setConfigValue pc padChars >> next
PadAlign pa -> setConfigValue (isPrefixOf "r" pa) padRight >> next
diff --git a/README b/README
index 43a7549..27fdcfb 100644
--- a/README
+++ b/README
@@ -465,6 +465,7 @@ These are the arguments that can be used for internal commands in the
-p number --ppad=number Pad percentages to given width
-m number --minwidth=number Minimum field width
-M number --maxwidth=number Maximum field width
+ -w number --width=number Fixed field width
-c chars --padchars=chars Chars used (cyclically) for padding
-a ["r" or "l"] --align=["r" or "l"] Pad alignment (right/left)
-t output template --template=output template Output template of the command.