Skip to content

Commit 031e16c

Browse files
authored
Merge pull request #24 from notok/fix_codes
Fix typo and bug in sample codes
2 parents c3dcf5e + 158035b commit 031e16c

12 files changed

+19
-19
lines changed

src/content/docs/config/app.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const label = Widget.Label()
4747

4848
If you want to change the style sheet on runtime
4949

50-
specifing a css file
50+
specifying a css file
5151

5252
```js
5353
App.applyCss('/path/to/file.css');

src/content/docs/config/config-object.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ properties will be applied on top of previous calls
1010
// config.js
1111
App.config({
1212
style: "./style.css",
13-
icons: "./assests",
13+
icons: "./assets",
1414
windows: [
1515
// Array<Gtk.Window>
1616
],

src/content/docs/config/custom-service.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class BrightnessService extends Service {
7575
#onChange() {
7676
this.#screenValue = Number(Utils.exec('brightnessctl get')) / this.#max;
7777

78-
// signals have to be explicity emitted
78+
// signals have to be explicitly emitted
7979
this.emit('changed'); // emits "changed"
8080
this.notify('screen-value'); // emits "notify::screen-value"
8181

src/content/docs/config/javascript.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ while (i < 5) {
7070
for loop
7171

7272
```js
73-
for (let i = 0; 0 < 5; i++) {
73+
for (let i = 0; i < 5; i++) {
7474
print(i)
7575
}
7676
```
@@ -154,7 +154,7 @@ function fn({ one, two }) {
154154
}
155155

156156
fn({ one: 'hello', two: 'mom' }) // hello, mom
157-
fn() // throws error because undefined can't be destructued
157+
fn() // throws error because undefined can't be destructed
158158
```
159159

160160
## Modules
@@ -163,7 +163,7 @@ exporting
163163

164164
```js
165165
export default 'hello'
166-
export const hi = 'mom'
166+
export const string = 'mom'
167167
export function fn(...params) {
168168
print(...params)
169169
}

src/content/docs/config/services.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Services
3-
description: Builtig services to query system information
3+
description: Builtin services to query system information
44
---
55

66
A Service is an instance of a [GObject.Object](https://gjs-docs.gnome.org/gobject20~2.0/gobject.object)
@@ -47,7 +47,7 @@ someService.connect('changed', (service, ...args) => {
4747

4848
:::caution
4949
If you reference a widget inside `someService.connect`, make sure to
50-
handle disconnection aswell if that widget is destroyed
50+
handle disconnection as well if that widget is destroyed
5151
:::
5252

5353
## List of builtin services

src/content/docs/config/utils.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ on NixOS make sure you have `security.pam.services.ags = {}` in `configuration.n
246246

247247
```js
248248
Utils.authenticate('password')
249-
.then(() => print('authentication sucessful'))
250-
.catch(err => logError(err, 'unsucessful'))
249+
.then(() => print('authentication successful'))
250+
.catch(err => logError(err, 'unsuccessful'))
251251
252252
Utils.authenticateUser("username", "password")
253-
.then(() => print("authentication sucessful"))
254-
.catch(err => logError(err, 'unsucessful'))
253+
.then(() => print("authentication successful"))
254+
.catch(err => logError(err, 'unsuccessful'))
255255
```
256256

257257
## Send Notifications

src/content/docs/config/widgets.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ These widgets have some additional properties on top of the base Gtk.Widget ones
1212
|----------|------|-------------|
1313
| class-name | `string` | List of class CSS selectors separated by white space. |
1414
| class-names | `Array<string>` | List of class CSS selectors. |
15-
| css | `string` | Inline CSS. e.g `label { color: white; }`. If no selector is specifed `*` will be assumed. e.g `color: white;` will be inferred as `*{ color: white; }`. |
15+
| css | `string` | Inline CSS. e.g `label { color: white; }`. If no selector is specified `*` will be assumed. e.g `color: white;` will be inferred as `*{ color: white; }`. |
1616
| hpack | `string` | Horizontal alignment, behaves like `halign`. `halign` takes an enum, but for convenience `hpack` can be given with a string, so one of `"start"`, `"center"`, `"end"`, `"fill"`. |
1717
| vpack | `string` | Vertical alignment. |
1818
| cursor | `string` | Cursor style when hovering over widgets that have hover states, e.g it won't work on labels. [list of valid values](https://docs.gtk.org/gdk3/ctor.Cursor.new_from_name.html). |
@@ -27,7 +27,7 @@ Some common Gtk.Widget properties you might want for example
2727
| vexpand | boolean | Expand vertically. |
2828
| sensitive | boolean | Makes the widget interactable. |
2929
| tooltip-text | string | Tooltip popup when the widget is hovered over. |
30-
| visible | boolean | Visibility of the widget. Setting this to `false` doesn't have any effect if the parent container calls `show_all()`, for example when you set a Box's childen dynamically. |
30+
| visible | boolean | Visibility of the widget. Setting this to `false` doesn't have any effect if the parent container calls `show_all()`, for example when you set a Box's children dynamically. |
3131

3232
If you don't want to mutate the `classNames` array,
3333
there is `toggleClassName`: `(name: string, enable: boolean) => void`

src/content/docs/services/backlight.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
title: Backlight
33
---
44

5-
There is no builtin Backligh service, but you can find an [example service implementation](../../config/custom-service) using `brightnessctl`.
5+
There is no builtin Backlight service, but you can find an [example service implementation](../../config/custom-service) using `brightnessctl`.

src/content/docs/services/bluetooth.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bluetooth
33
---
44

55
:::note
6-
package dependancy: `gnome-bluetooth-3.0`
6+
package dependency: `gnome-bluetooth-3.0`
77
for the battery percentage to work, make sure you have `Experimental = true` in `/etc/bluetooth/main.conf`
88
:::
99

src/content/docs/services/mpris.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Not every media player supports `position`, `volume` and other functionality. Su
3131

3232
### signals
3333

34-
* `position`: `(positon: number)` this is signaled when the position is set explicitly
34+
* `position`: `(position: number)` this is signaled when the position is set explicitly
3535
* `closed`
3636

3737
### properties

src/content/docs/services/network.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Network
33
---
44

55
:::note
6-
package dependancy: `network-manager`
6+
package dependency: `network-manager`
77
This service is somewhat incomplete, feel free to open a PR to improve it
88
:::
99

src/content/docs/services/powerprofiles.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Power Profiles
33
---
44

55
:::note
6-
package dependancy: `power-profiles-daemon`
6+
package dependency: `power-profiles-daemon`
77
on NixOS enable `services.power-profiles-daemon`
88
:::
99

0 commit comments

Comments
 (0)