From 1653f73cdffa935cc540942330dee6fade6ee111 Mon Sep 17 00:00:00 2001
From: Jan Beinke <git@janbeinke.com>
Date: Mon, 2 Mar 2020 03:13:23 +0100
Subject: [PATCH] Add formatting for the icon of the battery block

---
 src/QBar/Blocks/Battery.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/QBar/Blocks/Battery.hs b/src/QBar/Blocks/Battery.hs
index f30bc30..2c30f7e 100644
--- a/src/QBar/Blocks/Battery.hs
+++ b/src/QBar/Blocks/Battery.hs
@@ -78,10 +78,10 @@ updateBatteryBlock _ [] = updateBlockEmpty
 updateBatteryBlock isPlugged bs = updateBlock $ (shortText.~shortText') $ mkBlockOutput fullText'
   where
     fullText' :: BlockText
-    fullText' = normalText (batteryIcon <> " ") <> overallPercentage <> optionalEachBattery <> optionalOverallEstimate
+    fullText' = overallPercentage <> optionalEachBattery <> optionalOverallEstimate
 
     shortText' :: Maybe BlockText
-    shortText' = Just $ normalText (batteryIcon <> " ") <> overallPercentage
+    shortText' = Just overallPercentage
 
     batteryIcon :: T.Text
     batteryIcon
@@ -106,7 +106,7 @@ updateBatteryBlock isPlugged bs = updateBlock $ (shortText.~shortText') $ mkBloc
     perSingleBattery b = importantText (batteryImportance [b]) $ perSingleBatteryArrow b <> (formatFloatN 0 . batteryPercentage) [b] <> "%"
 
     overallPercentage :: BlockText
-    overallPercentage = mkText (not isPlugged) (batteryImportance bs) $ (formatFloatN 0 . batteryPercentage $ bs) <> "%"
+    overallPercentage = mkText (not isPlugged) (batteryImportance bs) $ batteryIcon <> " " <> (formatFloatN 0 . batteryPercentage $ bs) <> "%"
 
     optionalOverallEstimate :: BlockText
     optionalOverallEstimate = maybe mempty (\s -> surroundWith normalText " (" ")" s) . batteryEstimateFormated $ bs
-- 
GitLab