diff options
Diffstat (limited to 'docs/guide/getting-started')
-rw-r--r-- | docs/guide/getting-started/installation.md | 8 | ||||
-rw-r--r-- | docs/guide/getting-started/introduction.md | 12 | ||||
-rw-r--r-- | docs/guide/getting-started/nix.md | 38 | ||||
-rw-r--r-- | docs/guide/getting-started/supported-languages.md | 23 |
4 files changed, 64 insertions, 17 deletions
diff --git a/docs/guide/getting-started/installation.md b/docs/guide/getting-started/installation.md index e32b6a9..0cda3c5 100644 --- a/docs/guide/getting-started/installation.md +++ b/docs/guide/getting-started/installation.md @@ -22,22 +22,22 @@ maintainer: [@Aylur](https://github.com/Aylur) Read more about it on the [nix page](./nix#astal) -## Bulding From Source +## Building From Source 1. Install the following dependencies :::code-group ```sh [<i class="devicon-archlinux-plain"></i> Arch] -sudo pacman -Syu meson vala gtk3 gtk-layer-shell gobject-introspection +sudo pacman -Syu meson vala valadoc gtk3 gtk-layer-shell gobject-introspection ``` ```sh [<i class="devicon-fedora-plain"></i> Fedora] -sudo dnf install meson vala valadoc gtk3-devel gtk-layer-shell-devel gobject-introspection-devel +sudo dnf install meson vala valadoc gtk3-devel gtk-layer-shell-devel gobject-introspection-devel wayland-protocols-devel ``` ```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu] -sudo apt install meson valac libgtk-3-dev libgtk-layer-shell-dev gobject-introspection libgirepository1.0-dev +sudo apt install meson valac valadoc libgtk-3-dev libgtk-layer-shell-dev gobject-introspection libgirepository1.0-dev ``` ::: diff --git a/docs/guide/getting-started/introduction.md b/docs/guide/getting-started/introduction.md index 782c069..43a7bd8 100644 --- a/docs/guide/getting-started/introduction.md +++ b/docs/guide/getting-started/introduction.md @@ -2,13 +2,15 @@ ## What is Astal? -Astal (_meaning "desk"_) is a suite of libraries in Vala and C. +Astal (_meaning "desk"_) is a suite of libraries written in Vala and C. The core library [astal3](https://aylur.github.io/libastal/astal3) and -[astal4](https://aylur.github.io/libastal/astal4) (not yet available) -has some Gtk widgets that come packaged, +[astal4](https://aylur.github.io/libastal/astal4) +have some Gtk widgets that come packaged, the most important one being the [Window](https://aylur.github.io/libastal/astal3/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. -The other part of the core library [astal-io](https://aylur.github.io/libastal/astal-io) +The other component is [Application](https://aylur.github.io/libastal/astal3/class.Application.html) +which provides a way to send messages from the cli to running Astal instances. +The other part of the core library is [astal-io](https://aylur.github.io/libastal/astal-io) which contains some utility GLib shortcut for running external processes, reading, writing and monitoring files, timeout and interval functions. @@ -23,4 +25,4 @@ 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](../libraries/references#astal-libraries), you don't have to worry about these, -you just define the layout, style it with CSS and that's it. +you just define the layout, style with CSS hook up the state from libraries you want and that's it. diff --git a/docs/guide/getting-started/nix.md b/docs/guide/getting-started/nix.md index 6bc5d9b..3ded888 100644 --- a/docs/guide/getting-started/nix.md +++ b/docs/guide/getting-started/nix.md @@ -5,7 +5,43 @@ next: --- # Nix -Using Astal on Nix will require you to package your project. +Using Astal on Nix will require you to write a derivation for your project. +You can either copy and build off of these example flakes or you can +incorporate the derivations into your existing flake/configuration. + +## Installing libraries versus installing executables + +In case you did not know already, +you can't install libraries globally on Nix as you would with regular +package managers like `pacman`, `dnf` or `apt`. You have to write a +derivation for your projects like you would for any other program. +If you try to install a library through `home.packages` or `environment.systemPackages` +don't expect it to be picked up from runtimes. + +However, if you want to use the CLI tool that comes with some of the libraries +you have to **also** install them through `home.packages` or `environment.systemPackages` +alongside your derivations. + +### Astal CLI + +The core library also comes with a CLI tool that you can use to send +requests to your app. + +:::code-group + +```nix [nixos] +environment.systemPackages = [inputs.astal.packages.${system}.default]; +``` + +```nix [home-manager] +home.packages = [inputs.astal.packages.${system}.default]; +``` + +::: + +```sh [astal cli] +astal --list # list running instances +``` ## TypeScript diff --git a/docs/guide/getting-started/supported-languages.md b/docs/guide/getting-started/supported-languages.md index eacd1da..c38a001 100644 --- a/docs/guide/getting-started/supported-languages.md +++ b/docs/guide/getting-started/supported-languages.md @@ -18,16 +18,16 @@ The runtime is [GJS](https://gitlab.gnome.org/GNOME/gjs) and **not** nodejs Examples: -- [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/js/simple-bar) +- [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/simple-bar)  -- [Notification Popups](https://github.com/Aylur/astal/tree/main/examples/js/notifications) +- [Notification Popups](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/notifications)  -- [Applauncher](https://github.com/Aylur/astal/tree/main/examples/js/applauncher) +- [Applauncher](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/applauncher)  -- [Media Player](https://github.com/Aylur/astal/tree/main/examples/js/media-player) +- [Media Player](https://github.com/Aylur/astal/tree/main/examples/gtk3/js/media-player)  ## Lua @@ -36,9 +36,18 @@ Lua is well-supported, but I would still recommend TypeScript, as Lua lacks a ty Examples: -- [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/lua/simple-bar) +- [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/gtk3/lua/simple-bar)  +- [Notification Popups](https://github.com/Aylur/astal/tree/main/examples/lua/notifications) + + +- [Applauncher](https://github.com/Aylur/astal/tree/main/examples/lua/applauncher) + + +- [Media Player](https://github.com/Aylur/astal/tree/main/examples/lua/media-player) + + ## Python There is a WIP [package for python](https://github.com/aylur/astal/tree/feat/python), @@ -47,7 +56,7 @@ However, you can still use python the OOP way [pygobject](https://pygobject.gnom Examples: -- [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/py/simple-bar) +- [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/gtk3/py/simple-bar)  ## Vala @@ -58,7 +67,7 @@ using TypeScript or Lua over Vala as they are simpler to work with. Examples: -- [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/vala/simple-bar) +- [Simple Bar](https://github.com/Aylur/astal/tree/main/examples/gtk3/vala/simple-bar)  ## C |