Skip to content
Snippets Groups Projects
Commit 0a1752c4 authored by Jens Nolte's avatar Jens Nolte
Browse files

Apply some hlint suggestions

parent faf37398
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ class (ToJSON (Up s), FromJSON (Up s), ToJSON (Down s), FromJSON (Down s)) => Is ...@@ -55,7 +55,7 @@ class (ToJSON (Up s), FromJSON (Up s), ToJSON (Down s), FromJSON (Down s)) => Is
return (up, down) return (up, down)
where where
verbosePrintP :: Pipe ByteString ByteString IO () verbosePrintP :: Pipe ByteString ByteString IO ()
verbosePrintP = if verbose then (PP.chain $ BSC.hPutStrLn stderr) else cat verbosePrintP = if verbose then PP.chain $ BSC.hPutStrLn stderr else cat
handleByteStream :: s -> MainOptions -> Producer ByteString IO () -> Consumer ByteString IO () -> BarIO () handleByteStream :: s -> MainOptions -> Producer ByteString IO () -> Consumer ByteString IO () -> BarIO ()
handleByteStream s options up down = do handleByteStream s options up down = do
(handleUp, handleDown, cleanup) <- streamHandler s (handleUp, handleDown, cleanup) <- streamHandler s
......
...@@ -21,7 +21,7 @@ legacyBarConfig :: BarIO () ...@@ -21,7 +21,7 @@ legacyBarConfig :: BarIO ()
legacyBarConfig = do legacyBarConfig = do
let todo = pollScriptBlock $ blockLocation "todo" let todo = pollScriptBlock $ blockLocation "todo"
let networkEnvironment = pollScriptBlock $ blockLocation "network-environment" let networkEnvironment = pollScriptBlock $ blockLocation "network-environment"
let ram = (pollScriptBlock $ blockLocation "memory") >-> modify (addIcon "🐏\xFE0E") >-> autoPadding let ram = pollScriptBlock (blockLocation "memory") >-> modify (addIcon "🐏\xFE0E") >-> autoPadding
let temperature = (pollScriptBlock $ blockLocation "temperature") >-> autoPadding let temperature = (pollScriptBlock $ blockLocation "temperature") >-> autoPadding
let volumeBlock = scriptBlock $ blockLocation "volume-pulseaudio -S -F3" let volumeBlock = scriptBlock $ blockLocation "volume-pulseaudio -S -F3"
......
...@@ -55,7 +55,7 @@ tagParser = parser (False, normalImportant) ...@@ -55,7 +55,7 @@ tagParser = parser (False, normalImportant)
let background = listToMaybe . catMaybes $ backgrounds let background = listToMaybe . catMaybes $ backgrounds
void $ char '>' void $ char '>'
content <- T.fromStrict <$> A.takeWhile1 (notInClass "<>") content <- T.fromStrict <$> A.takeWhile1 (notInClass "<>")
void $ string $ "</span>" void $ string "</span>"
return $ mkStyledText color background content return $ mkStyledText color background content
where where
colorAttributeParser :: Text -> Parser Color colorAttributeParser :: Text -> Parser Color
...@@ -65,11 +65,8 @@ tagParser = parser (False, normalImportant) ...@@ -65,11 +65,8 @@ tagParser = parser (False, normalImportant)
skipSpace skipSpace
void $ char '=' void $ char '='
skipSpace skipSpace
value <- ( char '\'' *> colorParser <* char '\'' <|>
char '\'' *> colorParser <* char '\'' char '"' *> colorParser <* char '"'
<|> char '"' *> colorParser <* char '"'
)
return value
colorAttribute :: Parser (Maybe Color, Maybe Color) colorAttribute :: Parser (Maybe Color, Maybe Color)
colorAttribute = do colorAttribute = do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment