fix: lib: fix terminal lightness detection
This commit is contained in:
parent
79914cbe74
commit
9381b46004
@ -272,7 +272,7 @@ getLayerColor' l = do
|
|||||||
inemacs <- not.null <$> lookupEnv "INSIDE_EMACS"
|
inemacs <- not.null <$> lookupEnv "INSIDE_EMACS"
|
||||||
interactive <- hIsTerminalDevice stdout
|
interactive <- hIsTerminalDevice stdout
|
||||||
supportscolor <- hSupportsANSIColor 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
|
else fmap fractionalRGB <$> getLayerColor l
|
||||||
where
|
where
|
||||||
fractionalRGB :: (Fractional a) => RGB Word16 -> RGB a
|
fractionalRGB :: (Fractional a) => RGB Word16 -> RGB a
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user