summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Mpris.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2017-04-29 02:09:24 +0200
committerjao <jao@gnu.org>2017-04-29 02:09:24 +0200
commite41fd61bdeac8779fa24050cc0d44714f7c90f1d (patch)
treef724480c121a1246c942ed913f167fa71a9e2564 /src/Plugins/Monitors/Mpris.hs
parent938a8d8307c1c4794c5fcf269c587c3c5c5e70df (diff)
downloadxmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.gz
xmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.bz2
hlint configuration
Diffstat (limited to 'src/Plugins/Monitors/Mpris.hs')
-rw-r--r--src/Plugins/Monitors/Mpris.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Plugins/Monitors/Mpris.hs b/src/Plugins/Monitors/Mpris.hs
index 200e9f7..0228c8e 100644
--- a/src/Plugins/Monitors/Mpris.hs
+++ b/src/Plugins/Monitors/Mpris.hs
@@ -78,6 +78,7 @@ mprisConfig = mkMConfig "<artist> - <title>"
, "title", "tracknumber" , "composer", "genre"
]
+{-# NOINLINE dbusClient #-}
dbusClient :: DC.Client
dbusClient = unsafePerformIO DC.connectSession
@@ -106,7 +107,7 @@ unpackMetadata xs =
TypeVariant -> unpack $ fromVar v
TypeStructure _ ->
let x = structureItems (fromVar v) in
- if x == [] then [] else unpack (head x)
+ if null x then [] else unpack (head x)
_ -> []
getMetadata :: (MprisVersion a) => a -> DC.Client -> String -> IO [(String, Variant)]
@@ -141,5 +142,5 @@ makeList version md = map getStr (fieldsList version) where
_ -> (show::Int64 -> String) num
TypeArray TypeString ->
let x = arrayItems (fromVar v) in
- if x == [] then "" else fromVar (head x)
+ if null x then "" else fromVar (head x)
_ -> ""