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 | |
parent | 539a6b4cc1976aafd395e29450da83a17a73a6e0 (diff) |
docs: fix links
added initial documention for each library
-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 | ||||
-rw-r--r-- | docs/getting-started/introduction.md | 2 | ||||
-rw-r--r-- | docs/getting-started/supported-languages.md | 6 | ||||
-rw-r--r-- | docs/libraries/apps.md | 1 | ||||
-rw-r--r-- | docs/libraries/auth.md | 1 | ||||
-rw-r--r-- | docs/libraries/battery.md | 1 | ||||
-rw-r--r-- | docs/libraries/bluetooth.md | 1 | ||||
-rw-r--r-- | docs/libraries/hyprland.md | 1 | ||||
-rw-r--r-- | docs/libraries/libastal.md | 1 | ||||
-rw-r--r-- | docs/libraries/mpris.md | 1 | ||||
-rw-r--r-- | docs/libraries/network.md | 1 | ||||
-rw-r--r-- | docs/libraries/notifd.md | 1 | ||||
-rw-r--r-- | docs/libraries/powerprofiles.md | 1 | ||||
-rw-r--r-- | docs/libraries/river.md | 1 | ||||
-rw-r--r-- | docs/libraries/tray.md | 1 | ||||
-rw-r--r-- | docs/libraries/wireplumber.md | 1 | ||||
-rw-r--r-- | docs/vitepress.config.ts | 30 |
22 files changed, 47 insertions, 37 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. ::: diff --git a/docs/getting-started/introduction.md b/docs/getting-started/introduction.md index 252484d..0b0a840 100644 --- a/docs/getting-started/introduction.md +++ b/docs/getting-started/introduction.md @@ -19,5 +19,5 @@ Have you ever wanted to write a custom bar, custom notification popups or an applauncher, but gave up because writing a workspace widget, implementing the notification daemon or handling a search filter was too much of a hassle? -Astal libraries have you [covered](/astal/libraries/overview), you don't have to worry about these, +Astal libraries have you [covered](/astal/libraries/references), you don't have to worry about these, you just define the layout, style it with CSS and that's it. diff --git a/docs/getting-started/supported-languages.md b/docs/getting-started/supported-languages.md index 5b273b1..4ddda32 100644 --- a/docs/getting-started/supported-languages.md +++ b/docs/getting-started/supported-languages.md @@ -2,7 +2,7 @@ ## JavaScript -The main intended usage of Astal is in TypeScript with [AGS](/astal/ags/first-widgets). +The main intended usage of Astal is in TypeScript with [AGS](/ags/first-widgets). It supports JSX and has a state management solution similar to web frameworks. Only a minimal knowledge of JavaScript's syntax is needed to get started. @@ -16,7 +16,8 @@ Examples: ## Lua -Similar to how there is a [TypeScript]() lib for GJS, there is also an accompanying library for [Lua](). +Similar to how there is a [TypeScript](https://github.com/Aylur/astal/tree/main/core/gjs) lib for GJS, there is also an accompanying library for [Lua](https://github.com/Aylur/astal/tree/main/core/lua). +<!--TODO: open issue and link performance issue--> Unfortunately, I have encountered very heavy [performance issues]() with [lgi](https://github.com/lgi-devs/lgi), and so currently I don't recommend using Lua for full desktop shells, but only for static components that don't render child nodes dynamically, bars and panels for example. @@ -27,6 +28,7 @@ Examples: ## Python +<!--TODO: move python PR to monorepo and link--> There is a WIP [library for python](), to make it behave similar to the above two but I don't plan on finishing it, because I'm not a fan of python. If you are interested in picking it up, feel free to open a PR. diff --git a/docs/libraries/apps.md b/docs/libraries/apps.md new file mode 100644 index 0000000..a5c617f --- /dev/null +++ b/docs/libraries/apps.md @@ -0,0 +1 @@ +# Apps diff --git a/docs/libraries/auth.md b/docs/libraries/auth.md new file mode 100644 index 0000000..7ad9c14 --- /dev/null +++ b/docs/libraries/auth.md @@ -0,0 +1 @@ +# Auth diff --git a/docs/libraries/battery.md b/docs/libraries/battery.md new file mode 100644 index 0000000..2e720a4 --- /dev/null +++ b/docs/libraries/battery.md @@ -0,0 +1 @@ +# Battery diff --git a/docs/libraries/bluetooth.md b/docs/libraries/bluetooth.md new file mode 100644 index 0000000..3f7300f --- /dev/null +++ b/docs/libraries/bluetooth.md @@ -0,0 +1 @@ +# Bluetooth diff --git a/docs/libraries/hyprland.md b/docs/libraries/hyprland.md new file mode 100644 index 0000000..1a45399 --- /dev/null +++ b/docs/libraries/hyprland.md @@ -0,0 +1 @@ +# Hyprland diff --git a/docs/libraries/libastal.md b/docs/libraries/libastal.md new file mode 100644 index 0000000..b89f702 --- /dev/null +++ b/docs/libraries/libastal.md @@ -0,0 +1 @@ +# Astal diff --git a/docs/libraries/mpris.md b/docs/libraries/mpris.md new file mode 100644 index 0000000..57a4da6 --- /dev/null +++ b/docs/libraries/mpris.md @@ -0,0 +1 @@ +# Mpris diff --git a/docs/libraries/network.md b/docs/libraries/network.md new file mode 100644 index 0000000..05db335 --- /dev/null +++ b/docs/libraries/network.md @@ -0,0 +1 @@ +# Network diff --git a/docs/libraries/notifd.md b/docs/libraries/notifd.md new file mode 100644 index 0000000..e50a1b6 --- /dev/null +++ b/docs/libraries/notifd.md @@ -0,0 +1 @@ +# Notifd diff --git a/docs/libraries/powerprofiles.md b/docs/libraries/powerprofiles.md new file mode 100644 index 0000000..153ff12 --- /dev/null +++ b/docs/libraries/powerprofiles.md @@ -0,0 +1 @@ +# Power Profiles diff --git a/docs/libraries/river.md b/docs/libraries/river.md new file mode 100644 index 0000000..77a492c --- /dev/null +++ b/docs/libraries/river.md @@ -0,0 +1 @@ +# River diff --git a/docs/libraries/tray.md b/docs/libraries/tray.md new file mode 100644 index 0000000..42cf792 --- /dev/null +++ b/docs/libraries/tray.md @@ -0,0 +1 @@ +# Tray diff --git a/docs/libraries/wireplumber.md b/docs/libraries/wireplumber.md new file mode 100644 index 0000000..4e1d456 --- /dev/null +++ b/docs/libraries/wireplumber.md @@ -0,0 +1 @@ +# Wire Plumber diff --git a/docs/vitepress.config.ts b/docs/vitepress.config.ts index 62c7371..6a18529 100644 --- a/docs/vitepress.config.ts +++ b/docs/vitepress.config.ts @@ -1,9 +1,5 @@ import { defineConfig } from 'vitepress' -function reference(lib = "") { - return `https://aylur.github.io/libastal${lib}` -} - function github(url = "") { return `https://github.com/aylur/astal${url}` } @@ -65,19 +61,19 @@ export default defineConfig({ collapsed: true, items: [ { text: 'References', link: '/libraries/references' }, - { text: "Astal", link: reference("") }, - { text: "Apps", link: reference("/apps") }, - { text: "Auth", link: reference("/auth") }, - { text: "Battery", link: reference("/battery") }, - { text: "Bluetooth", link: reference("/bluetooth") }, - { text: "Hyprland", link: reference("/hyprland") }, - { text: "Mpris", link: reference("/mpris") }, - { text: "Network", link: reference("/network") }, - { text: "Notifd", link: reference("/notifd") }, - { text: "PowerProfiles", link: reference("/powerprofiles") }, - { text: "River", link: reference("/river") }, - { text: "Tray", link: reference("/tray") }, - { text: "WirePlumber", link: reference("/wireplumber") }, + { text: "Astal", link: "/libraries/libastal" }, + { text: "Apps", link: "/libraries/apps" }, + { text: "Auth", link: "/libraries/auth" }, + { text: "Battery", link: "/libraries/battery" }, + { text: "Bluetooth", link: "/libraries/bluetooth" }, + { text: "Hyprland", link: "/libraries/hyprland" }, + { text: "Mpris", link: "/libraries/mpris" }, + { text: "Network", link: "/libraries/network" }, + { text: "Notifd", link: "/libraries/notifd" }, + { text: "PowerProfiles", link: "/libraries/powerprofiles" }, + { text: "River", link: "/libraries/river" }, + { text: "Tray", link: "/libraries/tray" }, + { text: "WirePlumber", link: "/libraries/wireplumber" }, ], }, ], |