summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar
diff options
context:
space:
mode:
authorivanbrennan <ivan.brennan@gmail.com>2020-09-21 08:28:23 -0400
committerjao <jao@gnu.org>2020-10-09 19:09:30 +0100
commit796ad3a045528642495db549d3d870cfa34933da (patch)
tree3fb172f21cddb40c1cfc4565cc5c19ea52d0faa5 /src/Xmobar
parent407866c433735e510b6bde2d06e2a18cff22c470 (diff)
downloadxmobar-796ad3a045528642495db549d3d870cfa34933da.tar.gz
xmobar-796ad3a045528642495db549d3d870cfa34933da.tar.bz2
additionalFonts command-line option: --add-font
Provide an option the user can specify any number of times to add to the additionalFonts config field.
Diffstat (limited to 'src/Xmobar')
-rw-r--r--src/Xmobar/App/Opts.hs3
1 files changed, 3 insertions, 0 deletions
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})