Skip to content

Commit

Permalink
Merge pull request #27 from PixisVI/patch-1
Browse files Browse the repository at this point in the history
feat: add vpn to the network service
  • Loading branch information
Aylur authored Mar 28, 2024
2 parents 36dd4c9 + 8a38ced commit bb3d7e0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/content/docs/services/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This service is somewhat incomplete, feel free to open a PR to improve it
* `primary`: `"wifi" | "wired"`
* `wired`: `Wired`
* `wifi`: `Wifi`
* `vpn`: `Vpn`

## methods

Expand Down Expand Up @@ -58,6 +59,36 @@ meaning you can't bind to it or use notify::prop signal
* `state`: `string`: [NM.DeviceState](https://gjs-docs.gnome.org/nm10~1.0/nm.devicestate) as lowercase string
* `icon-name`: `string`

## Vpn

### signals

* `connection-added`: `(uuid: string)`
* `connection-removed`: `(uuid: string)`

### properties

* `connections`: `VpnConnection[]`
* `activated-connections`: `VpnConnection[]`

### methods

* `getConnection`: `(uuid: string) => VpnConnection`

## VpnConnection

### properties

* `uuid`: `string`
* `id`: `string`: The unique name of the connection
* `state`: `"connected" | "connecting" | "disconnecting" | "disconnected"`
* `vpn-state`: `"unknown" | "prepare" | "needs_auth" | "connect" | "ip_config" | "activated" | "failed" | "disconnected"`
* `icon-name`: `string`

### methods

* `setConnection`: `(connect: boolean) => void`

## Example Widget

```js
Expand Down

0 comments on commit bb3d7e0

Please sign in to comment.