Skip to content

Commit

Permalink
feat: add memory usage indicator to sample config
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Feb 10, 2024
1 parent cda05b3 commit cadc895
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions packages/desktop/resources/sample-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ window/bar:
# Width of the window in physical pixels.
width: '{{ self.args.MONITOR_WIDTH }}'
# Height of the window in physical pixels.
height: '50'
height: '45'
# X-position of the window in physical pixels.
position_x: '{{ self.args.MONITOR_X }}'
# Y-position of the window in physical pixels.
Expand All @@ -41,36 +41,50 @@ window/bar:
grid-template-columns: 1fr 1fr 1fr;
align-items: center;
height: 100%;
color: #ffffff;
color: #ffffffe6;
font-family: ui-monospace, monospace;
font-size: 13px;
padding: 4px 20px;
border-bottom: 2px solid #1d1d2a;
border-bottom: 1px solid #ffffff08;
background: linear-gradient(
rgba(15, 15, 40, 0.9),
rgba(15, 15, 40, 0.7),
rgba(14, 14, 28, 0.95),
rgba(26, 14, 28, 0.85),
);
group/left:
styles: |
display: flex;
align-items: center;
template/logo:
styles: |
margin-right: 20px;
template: |
<i class="nf nf-fa-windows"></i>
template/glazewm:
styles: |
display: flex;
align-items: center;
.workspace {
background: rgba(255, 255, 255, 0.05);
margin-right: 4px;
width: 30px;
height: 30px;
color: #ffffffe6;
border: none;
border-radius: 2px;
}
providers: ['glazewm']
template: |
@for (workspace of glazewm.workspacesOnMonitor) {
<button class="{{ workspace.state }}-workspace">
{{ workspace.name }}
</button>
<button class="workspace">{{ workspace.name }}</button>
}
group/center:
styles: |
justify-self: center;
template/clock:
providers: ['date']
# Available date tokens: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
Expand All @@ -86,6 +100,13 @@ window/bar:
margin-left: 14px;
margin-right: 4px;
}
template/memory:
providers: ['memory']
template: |
<i class="nf nf-fae-chip"></i>
{{ Math.round(memory.usage) }}%
template/cpu:
providers: ['cpu']
styles: |
Expand Down

0 comments on commit cadc895

Please sign in to comment.