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
85999aa4
Commit
85999aa4
authored
5 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Move cpu block icon into block
parent
43d8a408
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/QBar/Blocks/CpuUsage.hs
+2
-2
2 additions, 2 deletions
src/QBar/Blocks/CpuUsage.hs
src/QBar/DefaultConfig.hs
+2
-5
2 additions, 5 deletions
src/QBar/DefaultConfig.hs
with
4 additions
and
7 deletions
src/QBar/Blocks/CpuUsage.hs
+
2
−
2
View file @
85999aa4
...
@@ -4,7 +4,7 @@ module QBar.Blocks.CpuUsage where
...
@@ -4,7 +4,7 @@ module QBar.Blocks.CpuUsage where
import
Control.Applicative
((
<|>
))
import
Control.Applicative
((
<|>
))
import
Control.Lens
import
Control.Lens
import
Control.Monad.State
import
Control.Monad.State
(
StateT
,
evalStateT
)
import
qualified
Data.Attoparsec.Text.Lazy
as
AT
import
qualified
Data.Attoparsec.Text.Lazy
as
AT
import
qualified
Data.Text.Lazy
as
T
import
qualified
Data.Text.Lazy
as
T
import
QBar.BlockOutput
import
QBar.BlockOutput
...
@@ -119,7 +119,7 @@ cpuUsageBlock decimalPlaces = evalStateT cpuUsageBlock' createState
...
@@ -119,7 +119,7 @@ cpuUsageBlock decimalPlaces = evalStateT cpuUsageBlock' createState
cpuUsageBlock'
=
do
cpuUsageBlock'
=
do
updateState
updateState
importance
<-
cpuUsageImportance
importance
<-
cpuUsageImportance
updateBlock
.
mkBlockOutput
.
importantText
importance
=<<
cpuUsageText
updateBlock
.
mkBlockOutput
.
importantText
importance
=<<
(
"💻
\xFE0E
"
<>
)
<$>
cpuUsageText
cpuUsageBlock'
cpuUsageBlock'
createState
::
CpuBlockState
createState
::
CpuBlockState
createState
=
createState
=
...
...
This diff is collapsed.
Click to expand it.
src/QBar/DefaultConfig.hs
+
2
−
5
View file @
85999aa4
...
@@ -8,13 +8,11 @@ import Pipes
...
@@ -8,13 +8,11 @@ import Pipes
defaultBarConfig
::
BarIO
()
defaultBarConfig
::
BarIO
()
defaultBarConfig
=
do
defaultBarConfig
=
do
let
cpuUsage
=
cpuUsageBlock
1
>->
modify
(
addIcon
"💻
\xFE0E
"
)
-- TODO: commented-out blocks should be added as soon as they are implemented in qbar
-- TODO: commented-out blocks should be added as soon as they are implemented in qbar
addBlock
dateBlock
addBlock
dateBlock
addBlock
batteryBlock
addBlock
batteryBlock
--addBlock volumeBlock
--addBlock volumeBlock
addBlock
cpuUsage
addBlock
$
cpuUsage
Block
1
--addBlock ramUsageBlock
--addBlock ramUsageBlock
--addBlock cpuTemperatureBlock
--addBlock cpuTemperatureBlock
--addBlock networkBlock
--addBlock networkBlock
...
@@ -27,14 +25,13 @@ legacyBarConfig = do
...
@@ -27,14 +25,13 @@ legacyBarConfig = do
let
ram
=
(
scriptBlock
$
blockLocation
"memory"
)
>->
modify
(
addIcon
"🐏
\xFE0E
"
)
>->
autoPadding
let
ram
=
(
scriptBlock
$
blockLocation
"memory"
)
>->
modify
(
addIcon
"🐏
\xFE0E
"
)
>->
autoPadding
let
temperature
=
(
scriptBlock
$
blockLocation
"temperature"
)
>->
autoPadding
let
temperature
=
(
scriptBlock
$
blockLocation
"temperature"
)
>->
autoPadding
let
volumeBlock
=
persistentScriptBlock
$
blockLocation
"volume-pulseaudio -S -F3"
let
volumeBlock
=
persistentScriptBlock
$
blockLocation
"volume-pulseaudio -S -F3"
let
cpuUsage
=
cpuUsageBlock
1
>->
modify
(
addIcon
"💻
\xFE0E
"
)
addBlock
dateBlock
addBlock
dateBlock
addBlock
batteryBlock
addBlock
batteryBlock
addBlock
volumeBlock
addBlock
volumeBlock
addBlock
temperature
addBlock
temperature
addBlock
ram
addBlock
ram
addBlock
cpuUsage
addBlock
$
cpuUsage
Block
1
addBlock
networkEnvironment
addBlock
networkEnvironment
addBlock
wifi
addBlock
wifi
addBlock
todo
addBlock
todo
...
...
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