Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qbar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
qbar
Commits
1653f73c
Verified
Commit
1653f73c
authored
5 years ago
by
Legy (Beini)
Browse files
Options
Downloads
Patches
Plain Diff
Add formatting for the icon of the battery block
parent
4f6a4e25
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/QBar/Blocks/Battery.hs
+3
-3
3 additions, 3 deletions
src/QBar/Blocks/Battery.hs
with
3 additions
and
3 deletions
src/QBar/Blocks/Battery.hs
+
3
−
3
View file @
1653f73c
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment