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
2865d49d
Commit
2865d49d
authored
4 years ago
by
Mr. Snow Ball / projects
Browse files
Options
Downloads
Patches
Plain Diff
Add qubesProperty block to CLI
parent
841119f8
No related branches found
Branches containing commit
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.hs
+1
-0
1 addition, 0 deletions
src/QBar/Blocks.hs
src/QBar/Cli.hs
+7
-1
7 additions, 1 deletion
src/QBar/Cli.hs
with
8 additions
and
1 deletion
src/QBar/Blocks.hs
+
1
−
0
View file @
2865d49d
...
...
@@ -5,6 +5,7 @@ module QBar.Blocks
QBar
.
Blocks
.
DiskUsage
.
diskUsageBlock
,
QBar
.
Blocks
.
NetworkManager
.
networkManagerBlock
,
QBar
.
Blocks
.
Qubes
.
diskUsageQubesBlock
,
QBar
.
Blocks
.
Qubes
.
qubesMonitorPropertyBlock
,
QBar
.
Blocks
.
Script
.
scriptBlock
,
QBar
.
Blocks
.
Script
.
pollScriptBlock
,
)
...
...
This diff is collapsed.
Click to expand it.
src/QBar/Cli.hs
+
7
−
1
View file @
2865d49d
...
...
@@ -94,7 +94,8 @@ blockParser =
command
"disk"
(
info
diskUsageBlockParser
(
progDesc
"Load the disk usage block."
))
<>
command
"networkmanager"
(
info
(
pure
$
addBlock
networkManagerBlock
)
(
progDesc
"Load the network-manager block."
))
<>
command
"script"
(
info
scriptBlockParser
(
progDesc
"Display the output of an external script as a block."
))
<>
command
"diskQubesPool"
(
info
(
pure
$
addBlock
diskUsageQubesBlock
)
(
progDesc
"Load a block that shows free space in Qubes' default pool."
))
command
"diskQubesPool"
(
info
(
pure
$
addBlock
diskUsageQubesBlock
)
(
progDesc
"Load a block that shows free space in Qubes' default pool."
))
<>
command
"qubesProperty"
(
info
qubesPropertyBlockParser
(
progDesc
"Display the current value of a Qubes property."
))
)
diskUsageBlockParser
::
Parser
(
BarIO
()
)
...
...
@@ -118,6 +119,11 @@ scriptBlockParser = helper <*> do
script
<-
strArgument
(
metavar
"SCRIPT"
<>
help
"The script that will be executed with a shell."
)
return
$
(
if
poll
then
addBlock
.
pollScriptBlock
pollInterval
else
addBlock
.
scriptBlock
clickEvents
)
script
qubesPropertyBlockParser
::
Parser
(
BarIO
()
)
qubesPropertyBlockParser
=
do
name
<-
strArgument
(
metavar
"NAME"
<>
help
"The NAME of the property."
)
return
$
addBlock
$
qubesMonitorPropertyBlock
name
qubesCommandParser
::
Parser
(
MainOptions
->
IO
()
)
qubesCommandParser
=
hsubparser
(
command
"stats"
(
info
(
pure
$
const
$
printEvents
qubesVMStats
)
(
progDesc
"Subscribe to VM stats and print them to stdout."
))
<>
...
...
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