Fix taffybar HLint hints

This commit is contained in:
2026-04-28 11:39:09 -07:00
parent 4dfaabc569
commit d5abefe15e

View File

@@ -1,6 +1,5 @@
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
module Main (main) where module Main (main) where
@@ -9,6 +8,7 @@ import Control.Monad (void, when)
import Control.Monad.IO.Class (MonadIO, liftIO) import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Reader (asks) import Control.Monad.Trans.Reader (asks)
import Data.Char (toLower) import Data.Char (toLower)
import Data.Foldable (for_)
import Data.GI.Base (castTo) import Data.GI.Base (castTo)
import Data.Int (Int32) import Data.Int (Int32)
import Data.List (nub) import Data.List (nub)
@@ -85,9 +85,7 @@ decorateWithClassAndBoxM klass builder =
forEachLabelRecursively :: Gtk.Widget -> (Gtk.Label -> IO ()) -> IO () forEachLabelRecursively :: Gtk.Widget -> (Gtk.Label -> IO ()) -> IO ()
forEachLabelRecursively widget action = do forEachLabelRecursively widget action = do
maybeLabel <- castTo Gtk.Label widget maybeLabel <- castTo Gtk.Label widget
case maybeLabel of for_ maybeLabel action
Just label -> action label
Nothing -> pure ()
maybeContainer <- castTo Gtk.Container widget maybeContainer <- castTo Gtk.Container widget
case maybeContainer of case maybeContainer of
@@ -347,7 +345,7 @@ mprisWidget =
simplePlayerWidget simplePlayerWidget
defaultPlayerConfig defaultPlayerConfig
{ setNowPlayingLabel = { setNowPlayingLabel =
\np -> stackedMprisLabel <$> playingText 20 20 np, fmap stackedMprisLabel . playingText 20 20,
setupPlayerLabel = setFixedLabelWidth 20 setupPlayerLabel = setFixedLabelWidth 20
} }
} }