From 796ad3a045528642495db549d3d870cfa34933da Mon Sep 17 00:00:00 2001 From: ivanbrennan Date: Mon, 21 Sep 2020 08:28:23 -0400 Subject: additionalFonts command-line option: --add-font Provide an option the user can specify any number of times to add to the additionalFonts config field. --- src/Xmobar/App/Opts.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Xmobar/App') diff --git a/src/Xmobar/App/Opts.hs b/src/Xmobar/App/Opts.hs index 5015546..daa7de6 100644 --- a/src/Xmobar/App/Opts.hs +++ b/src/Xmobar/App/Opts.hs @@ -31,6 +31,7 @@ data Opts = Help | Recompile | Version | Font String + | AddFont String | BgColor String | FgColor String | Alpha String @@ -56,6 +57,7 @@ options = , Option "r" ["recompile"] (NoArg Recompile) "Force recompilation" , Option "V" ["version"] (NoArg Version) "Show version information" , Option "f" ["font"] (ReqArg Font "font name") "Font name" + , Option "N" ["add-font"] (ReqArg AddFont "font name") "Add to the list of additional fonts" , Option "w" ["wmclass"] (ReqArg WmClass "class") "X11 WM_CLASS property" , Option "n" ["wmname"] (ReqArg WmName "name") "X11 WM_NAME property" , Option "B" ["bgcolor"] (ReqArg BgColor "bg color" ) @@ -127,6 +129,7 @@ doOpts conf (o:oo) = Recompile -> doOpts' conf Verbose -> doOpts' (conf {verbose = True}) Font s -> doOpts' (conf {font = s}) + AddFont s -> doOpts' (conf {additionalFonts = additionalFonts conf ++ [s]}) WmClass s -> doOpts' (conf {wmClass = s}) WmName s -> doOpts' (conf {wmName = s}) BgColor s -> doOpts' (conf {bgColor = s}) -- cgit v1.2.3