@@ -158,6 +158,9 @@ data VtyUserConfig =
158158 -- configuration specifies one. If no custom table is loaded
159159 -- (or if a load fails), the built-in character width table
160160 -- will be used.
161+ , configPreferredColorMode :: Maybe ColorMode
162+ -- ^ Preferred color mode. If set, this should
163+ -- override platform color mode detection.
161164 }
162165 deriving (Show , Eq )
163166
@@ -175,6 +178,8 @@ instance Semigroup VtyUserConfig where
175178 configTermWidthMaps c1 <|> configTermWidthMaps c0
176179 , configAllowCustomUnicodeWidthTables =
177180 configAllowCustomUnicodeWidthTables c1 <|> configAllowCustomUnicodeWidthTables c0
181+ , configPreferredColorMode =
182+ configPreferredColorMode c1 <|> configPreferredColorMode c0
178183 }
179184
180185instance Monoid VtyUserConfig where
@@ -183,6 +188,7 @@ instance Monoid VtyUserConfig where
183188 , configInputMap = mempty
184189 , configTermWidthMaps = []
185190 , configAllowCustomUnicodeWidthTables = Nothing
191+ , configPreferredColorMode = Nothing
186192 }
187193#if !(MIN_VERSION_base(4,11,0))
188194 mappend = (<>)
0 commit comments