diff options
author | Aylur <[email protected]> | 2024-09-04 23:32:53 +0000 |
---|---|---|
committer | Aylur <[email protected]> | 2024-09-04 23:32:53 +0000 |
commit | 93e41a321212361c175812788492d56e5a89ade3 (patch) | |
tree | 17d8513fb7f240acb8d9f5d5a95041a06b245e4d /docs/ags | |
parent | 539a6b4cc1976aafd395e29450da83a17a73a6e0 (diff) |
docs: fix links
added initial documention for each library
Diffstat (limited to 'docs/ags')
-rw-r--r-- | docs/ags/cli-app.md | 2 | ||||
-rw-r--r-- | docs/ags/first-widgets.md | 10 | ||||
-rw-r--r-- | docs/ags/theming.md | 7 | ||||
-rw-r--r-- | docs/ags/utilities.md | 4 | ||||
-rw-r--r-- | docs/ags/variable.md | 4 | ||||
-rw-r--r-- | docs/ags/widget.md | 6 |
6 files changed, 16 insertions, 17 deletions
diff --git a/docs/ags/cli-app.md b/docs/ags/cli-app.md index 0f17d55..e647fbf 100644 --- a/docs/ags/cli-app.md +++ b/docs/ags/cli-app.md @@ -1,6 +1,6 @@ # CLI and App -`App` is a singleton **instance** of [Astal.Application](/astal/reference/class.Application.html). +`App` is a singleton **instance** of [Astal.Application](https://aylur.github.io/libastal/class.Application.html). ```tsx import { App } from "astal" diff --git a/docs/ags/first-widgets.md b/docs/ags/first-widgets.md index 4073d8a..f098586 100644 --- a/docs/ags/first-widgets.md +++ b/docs/ags/first-widgets.md @@ -36,7 +36,7 @@ The bundler used is [esbuild](https://esbuild.github.io/). Astal apps are composed of widgets. A widget is a piece of UI that has its own logic and style. A widget can be as small as a button or an entire bar. -The top level widget is always a [Window]() which will hold all widgets. +The top level widget is always a [Window](https://aylur.github.io/libastal/class.Window.html) which will hold all widgets. ::: code-group @@ -261,10 +261,10 @@ return <MyWidget myprop="hello"> ## State management -The state of widgets are handled with [Bindings](). A `Binding` lets you -connect the state of one [GObject]() to another, in our case it is used to +The state of widgets are handled with Bindings. A `Binding` lets you +connect the state of one [GObject](https://docs.gtk.org/gobject/class.Object.html) to another, in our case it is used to rerender part of a widget based on the state of a `GObject`. -A `GObject` can be a [Variable]() or it can be from a [Library](). +A `GObject` can be a [Variable](./variable) or it can be from a [Library](/libraries/references). We use the `bind` function to create a `Binding` object from a `Variable` or a regular GObject and one of its properties. @@ -313,7 +313,7 @@ return <box> ::: Here is an example of a battery percent label that binds the `percentage` -property of the Battery object from the [Battery Library](): +property of the Battery object from the [Battery Library](/libraries/battery): ```tsx import Battery from "gi://AstalBattery" diff --git a/docs/ags/theming.md b/docs/ags/theming.md index 2c28ffb..0a6d7c5 100644 --- a/docs/ags/theming.md +++ b/docs/ags/theming.md @@ -1,9 +1,4 @@ ---- -title: Theming -description: GTK3 CSS theming -sidebar: - order: 1 ---- +# Theming Since the widget toolkit is **GTK3** theming is done with **CSS**. diff --git a/docs/ags/utilities.md b/docs/ags/utilities.md index f20c7ff..81551bc 100644 --- a/docs/ags/utilities.md +++ b/docs/ags/utilities.md @@ -48,7 +48,7 @@ import { interval, timeout, idle } from "astal" You can use javascript native `setTimeout` or `setInterval` they return a [GLib.Source](https://docs.gtk.org/glib/struct.Source.html) instance. Alternatively you can use these functions provided by Astal, -which return an [Astal.Time]() instance. +which return an [Astal.Time](https://aylur.github.io/libastal/class.Time.html) instance. `Astal.Time` has a `now` signal and a `cancelled` signal. @@ -105,7 +105,7 @@ import { subprocess, exec, execAsync } from "astal" ### Subprocess You can start a subprocess and run callback functions whenever it outputs to -stdout or stderr. [Astal.Process]() has a `stdout` and `stderr` signal. +stdout or stderr. [Astal.Process](https://aylur.github.io/libastal/class.Process.html) has a `stdout` and `stderr` signal. ```typescript function subprocess(args: { diff --git a/docs/ags/variable.md b/docs/ags/variable.md index b724df8..06098dd 100644 --- a/docs/ags/variable.md +++ b/docs/ags/variable.md @@ -7,6 +7,10 @@ import { Variable } from "astal" Variable is just a simple `GObject` that holds a value. And has shortcuts for hooking up subprocesses. +:::info +The `Variable` object imported from the `"astal"` package is **not** [Astal.Variable](https://aylur.github.io/libastal/class.Variable.html). +::: + ## Variable as state ```typescript diff --git a/docs/ags/widget.md b/docs/ags/widget.md index ff7d3ce..122fa3e 100644 --- a/docs/ags/widget.md +++ b/docs/ags/widget.md @@ -11,14 +11,14 @@ These are properties that Astal.js additionally adds to Gtk.Widgets To have a full list of available properties, reference the documentation of the widget. -- [Astal widgets](/astal/reference#classes) +- [Astal widgets](https://aylur.github.io/libastal/index.html#classes) - [Gtk widgets](https://docs.gtk.org/gtk3/#classes) You can check the [source code](https://github.com/aylur/astal/blob/main/gjs/src/widgets.ts) to have a full list of builtin widgets. ## AGS widget methods -Additional methods that Astal.js add to Gtk.Widget instances +Additional methods that Astal.js adds to Gtk.Widget instances ### setup @@ -141,5 +141,5 @@ function MyWidget() { :::info Signal properties have to be annotated manually for TypeScript. You can reference [Gtk3](https://gjs-docs.gnome.org/gtk30~3.0/) -and [Astal](/astal/reference#classes) for available signals. +and [Astal](https://aylur.github.io/libastal/index.html#classes) for available signals. ::: |