Skip to content

Commit 4b8cf70

Browse files
authored
Merge pull request #16 from FromWau/patch-1
Fixed some issues in first-widgets.md
2 parents 76381cc + 8a8d8d5 commit 4b8cf70

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/content/docs/config/first-widgets.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const Bar = (monitor = 0) => Widget.Window({
146146
name: `bar${monitor}`,
147147
anchor: ['top', 'left', 'right'],
148148
child: Widget.Label()
149-
.poll(1000, label => label.label = exec('date')),
149+
.poll(1000, label => label.label = Utils.exec('date')),
150150
})
151151
```
152152

@@ -161,6 +161,8 @@ const date = Variable('', {
161161
})
162162

163163
const Bar = () => Widget.Window({
164+
name: 'bar',
165+
anchor: ['top', 'left', 'right'],
164166
child: Widget.Label({ label: date.bind() })
165167
})
166168
```
@@ -192,6 +194,7 @@ myVariable.connect('changed', ({ value }) => {
192194
```js
193195
const bar = Widget.Window({
194196
name: 'bar',
197+
anchor: ['top', 'left', 'right'],
195198
child: Widget.Label({
196199
label: myVariable.bind().transform(v => `value: ${v}`)
197200
}),
@@ -226,7 +229,7 @@ pactl.connect('changed', ({ value }) => {
226229
const label = Widget.Label({
227230
label: pactl.bind().transform(({ count, msg }) => {
228231
return `${msg} ${count}`
229-
})),
232+
}),
230233
})
231234

232235
// widgets are GObjects too

0 commit comments

Comments
 (0)