From dc262d1628aa3e1bfe17ce99bfe89782b6185cc5 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 3 Feb 2022 05:14:45 +0000 Subject: TextOutputColor -> TextOutputFormat Thinking of eventually adding a Sway JSON output, or simply add fonts to Pango specification, so it's more than colors. Also, NoColors -> Plain. --- src/Xmobar/Config/Parse.hs | 6 +++--- src/Xmobar/Config/Types.hs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Xmobar/Config') diff --git a/src/Xmobar/Config/Parse.hs b/src/Xmobar/Config/Parse.hs index fa99c59..89af808 100644 --- a/src/Xmobar/Config/Parse.hs +++ b/src/Xmobar/Config/Parse.hs @@ -62,7 +62,7 @@ parseConfig defaultConfig = perms = permute $ Config <$?> pFont <|?> pFontList <|?> pWmClass <|?> pWmName <|?> pBgColor <|?> pFgColor <|?> pPosition - <|?> pTextOutput <|?> pTextOutputColors + <|?> pTextOutput <|?> pTextOutputFormat <|?> pTextOffset <|?> pTextOffsets <|?> pIconOffset <|?> pBorder <|?> pBdColor <|?> pBdWidth <|?> pAlpha <|?> pHideOnStart @@ -78,11 +78,11 @@ parseConfig defaultConfig = , "allDesktops", "overrideRedirect", "pickBroadest" , "hideOnStart", "lowerOnStart", "persistent", "iconRoot" , "alpha", "commands", "verbose", "signal", "textOutput" - , "textOutputColors" + , "textOutputFormat" ] pTextOutput = readField textOutput "textOutput" - pTextOutputColors = readField textOutputColors "textOutputColors" + pTextOutputFormat = readField textOutputFormat "textOutputFormat" 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 5f19528..7914a87 100644 --- a/src/Xmobar/Config/Types.hs +++ b/src/Xmobar/Config/Types.hs @@ -16,7 +16,7 @@ module Xmobar.Config.Types ( -- * Configuration -- $config Config (..) - , XPosition (..), Align (..), Border (..), TextColorFormat (..) + , XPosition (..), Align (..), Border (..), TextOutputFormat (..) , SignalChan (..) ) where @@ -37,7 +37,7 @@ data Config = , fgColor :: String -- ^ Default font color , position :: XPosition -- ^ Top Bottom or Static , textOutput :: Bool -- ^ Write data to stdout instead of X - , textOutputColors :: TextColorFormat -- ^ Which color format to use for stdout: Ansi or Pango + , textOutputFormat :: TextOutputFormat -- ^ Which color format to use for stdout: Ansi or Pango , 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 @@ -98,7 +98,7 @@ data Border = NoBorder | FullBM Int deriving ( Read, Show, Eq ) -data TextColorFormat = NoColors | Ansi | Pango deriving ( Read, Show, Eq ) +data TextOutputFormat = Plain | Ansi | Pango deriving ( Read, Show, Eq ) newtype SignalChan = SignalChan { unSignalChan :: Maybe (STM.TMVar SignalType) } -- cgit v1.2.3