fix: lib: fix terminal lightness detection

This commit is contained in:
Simon Michael 2023-01-27 16:51:05 -10:00
parent 79914cbe74
commit 9381b46004

View File

@ -272,7 +272,7 @@ getLayerColor' l = do
inemacs <- not.null <$> lookupEnv "INSIDE_EMACS"
interactive <- hIsTerminalDevice stdout
supportscolor <- hSupportsANSIColor stdout
if inemacs || interactive || not supportscolor then return Nothing
if inemacs || not interactive || not supportscolor then return Nothing
else fmap fractionalRGB <$> getLayerColor l
where
fractionalRGB :: (Fractional a) => RGB Word16 -> RGB a