From 0d3021eb601dadfa10fae30f108108894086c82c Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 28 Jan 2022 05:11:09 +0000 Subject: Basic text output, without colors, working --- src/Xmobar/Config/Parse.hs | 7 ++++--- src/Xmobar/Config/Types.hs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Xmobar/Config') diff --git a/src/Xmobar/Config/Parse.hs b/src/Xmobar/Config/Parse.hs index f7c8b31..e7d5933 100644 --- a/src/Xmobar/Config/Parse.hs +++ b/src/Xmobar/Config/Parse.hs @@ -2,7 +2,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Xmobar.Config.Parse --- Copyright: (c) 2018, 2020 Jose Antonio Ortega Ruiz +-- Copyright: (c) 2018, 2020, 2022 Jose Antonio Ortega Ruiz -- License: BSD3-style (see LICENSE) -- -- Maintainer: jao@gnu.org @@ -62,7 +62,7 @@ parseConfig defaultConfig = perms = permute $ Config <$?> pFont <|?> pFontList <|?> pWmClass <|?> pWmName <|?> pBgColor <|?> pFgColor - <|?> pPosition <|?> pTextOffset <|?> pTextOffsets + <|?> pPosition <|?> pTextOutput <|?> pTextOffset <|?> pTextOffsets <|?> pIconOffset <|?> pBorder <|?> pBdColor <|?> pBdWidth <|?> pAlpha <|?> pHideOnStart <|?> pAllDesktops <|?> pOverrideRedirect <|?> pPickBroadest @@ -76,9 +76,10 @@ parseConfig defaultConfig = , "position" , "textOffset", "textOffsets", "iconOffset" , "allDesktops", "overrideRedirect", "pickBroadest" , "hideOnStart", "lowerOnStart", "persistent", "iconRoot" - , "alpha", "commands", "verbose", "signal" + , "alpha", "commands", "verbose", "signal", "textOutput" ] + pTextOutput = readField textOutput "textOutput" pFont = strField font "font" pFontList = strListField additionalFonts "additionalFonts" pWmClass = strField wmClass "wmClass" diff --git a/src/Xmobar/Config/Types.hs b/src/Xmobar/Config/Types.hs index 8bbae40..816edaa 100644 --- a/src/Xmobar/Config/Types.hs +++ b/src/Xmobar/Config/Types.hs @@ -36,6 +36,7 @@ data Config = , bgColor :: String -- ^ Backgroud color , fgColor :: String -- ^ Default font color , position :: XPosition -- ^ Top Bottom or Static + , textOutput :: Bool -- ^ Write data to stdout instead of X , textOffset :: Int -- ^ Offset from top of window for text , textOffsets :: [Int] -- ^ List of offsets for additionalFonts , iconOffset :: Int -- ^ Offset from top of window for icons -- cgit v1.2.3