Skip to content

Commit

Permalink
feat: add vpn to the network service
Browse files Browse the repository at this point in the history
Related PR Aylur/ags#341
  • Loading branch information
PixisVI authored Mar 27, 2024
1 parent 36dd4c9 commit 8a38ced
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 8a38ced

Please sign in to comment.