docs: migrate to vitepress

vitepress feels a bit more polished and clean
This commit is contained in:
Aylur
2024-09-03 20:32:41 +02:00
parent b8acc3897f
commit 6f39857dc7
38 changed files with 1592 additions and 7311 deletions
+77
View File
@@ -0,0 +1,77 @@
# Installation
## Nix
maintainer: [@Aylur](https://github.com/Aylur)
Read more about it on the [nix page](./nix)
## Arch
maintainer: [@kotontrion](https://github.com/kotontrion)
:::code-group
```sh [Core Library]
yay -S libastal-git
```
```sh [Every Library]
yay -S libastal-meta
```
:::
## Bulding libastal from source
1. Clone the repo
```bash
git clone https://github.com/aylur/astal.git
cd astal/core
```
2. Install the following dependencies
:::code-group
```sh [Fedora]
sudo dnf install meson gcc valac gtk3-devel gtk-layer-shell-devel
```
```sh [Arch]
sudo pacman -Syu meson vala gtk3 gtk-layer-shell gobject-introspection
```
```sh [Alpine]
sudo apk add meson g++ vala gtk+3.0-dev gtk-layer-shell-dev gobject-introspection-dev
```
```sh [Ubuntu]
sudo apt install meson valac libgtk3-dev libgtk-layer-shell-dev gobject-introspection
```
```bash [openSUSE]
sudo zypper install gcc meson vala gtk3-devel gtk-layer-shell-devel gobject-introspection-devel
```
:::
3. Build and install with `meson`
```bash
meson setup build
meson install -C build
```
:::info
Most distros recommend manual installs in `/usr/local`,
which is what `meson` defaults to. If you want to install to `/usr`
instead which most package managers do, set the `prefix` option:
```bash
meson setup --prefix /usr build
meson install -C build
```
:::
+23
View File
@@ -0,0 +1,23 @@
# Introduction
## What is Astal?
Astal (_meaning "desk"_) is a bundle of libraries built using [GLib](https://docs.gtk.org/glib/) in Vala and C.
The core library [libastal](https://aylur.github.io/libastal) has some Gtk widgets that come packaged,
the most important one is the [Window](https://aylur.github.io/libastal/class.Window.html) which is the main toplevel component using [gtk-layer-shell](https://github.com/wmww/gtk-layer-shell).
This is what allows us to use Gtk as shell components on Wayland.
libastal also comes with some utility functions such as running external processes,
reading, writing and monitoring files.
## Why Astal?
What makes Astal convenient to use is not the core library, as it could easily be replaced
by the standard library of any of your favorite language that has bindings to Gtk, it is the
accompanying libraries (_formerly known as "services" in AGS_)
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,
you just define the layout, style it with CSS and that's it.
+1
View File
@@ -0,0 +1 @@
# Nix
@@ -0,0 +1,59 @@
# Supported Languages
## JavaScript
The main intended usage of Astal is in TypeScript with [AGS](/astal/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.
:::info
The runtime is [GJS](https://gitlab.gnome.org/GNOME/gjs) and **not** nodejs
:::
Examples:
- TODO
## Lua
Similar to how there is a [TypeScript]() lib for GJS, there is also an accompanying library for [Lua]().
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.
Examples:
- TODO
## Python
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.
Nonetheless you can still use python the OOP way [pygobject](https://pygobject.gnome.org/tutorials/gobject/subclassing.html) intended it.
Examples:
- TODO
## Vala
Vala is a language that simply put uses C# syntax and compiles to C.
It is the language most of Astal is written in.
Examples:
- TODO
## C
I don't recommend using C as it requires quite a lot of boilerplate.
Examples:
- TODO
## Other languages
There a few more that supports gobject-introspection, most notably Haskell, Rust and C++.
If you are interested and feel like contributing, PRs are welcome for bindings, and examples.