From 80463639720a644a7bfdafa9aebd4488a47b67f4 Mon Sep 17 00:00:00 2001 From: Aylur Date: Mon, 30 Sep 2024 10:58:32 +0000 Subject: docs: clarify ags installation #30 --- docs/guide/getting-started/nix.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'docs/guide') diff --git a/docs/guide/getting-started/nix.md b/docs/guide/getting-started/nix.md index 2b04bdc..c9ed270 100644 --- a/docs/guide/getting-started/nix.md +++ b/docs/guide/getting-started/nix.md @@ -146,9 +146,34 @@ Example content of `home.nix` file AGS by default only includes the core `libastal` library. If you want to include any other [library](../libraries/references) you have to add them to `extraPackages`. -You can also add binaries which will be added to `$PATH`. +You can also add binaries which will be added to the gjs runtime. :::warning The `configDir` option symlinks the given path to `~/.config/ags`. If you already have your source code there leave it as `null`. ::: + +The AGS flake does not expose the `astal` cli to the home environment, you have to do that yourself if you want: + +:::code-group + +```nix [ home.nix] +home.packages = [ inputs.ags.packages.${pkgs.system}.astal ]; +``` + +::: + +Same applies to the `extraPackages` option, it does not expose the passed packages to the home environment. +To make astal cli tools available to home environments, you have to add them yourself: + +:::code-group + +```nix [ home.nix] +home.packages = [ inputs.ags.packages.${pkgs.system}.notifd ]; +``` + +```sh [ sh] +astal-notifd --help +``` + +::: -- cgit v1.2.3 From c3093f12a7318618cfc5a136f618896daea9c5ab Mon Sep 17 00:00:00 2001 From: Aylur Date: Mon, 30 Sep 2024 17:09:54 +0200 Subject: docs: update lock files --- docs/guide/ags/theming.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'docs/guide') diff --git a/docs/guide/ags/theming.md b/docs/guide/ags/theming.md index ea83e35..cb0ebff 100644 --- a/docs/guide/ags/theming.md +++ b/docs/guide/ags/theming.md @@ -99,26 +99,18 @@ workaround by using preprocessors like [SCSS](https://sass-lang.com/). :::code-group -```sh [Arch] +```sh [ Arch] sudo pacman -Syu dart-sass ``` -```sh [Fedora] +```sh [ Fedora] npm install -g sass # not packaged on Fedora ``` -```sh [Alpine] -sudo apk add dart-sass -``` - -```sh [Ubuntu] +```sh [ Ubuntu] npm install -g sass # not packaged on Ubuntu ``` -```sh [openSUSE] -sudo zypper install dart-sass -``` - ::: Importing `scss` files will simply return transpiled css. -- cgit v1.2.3 From a6141011c2bed071eb908f4468274f44e18dc64a Mon Sep 17 00:00:00 2001 From: Aylur Date: Thu, 3 Oct 2024 21:39:40 +0000 Subject: docs: window toggling --- docs/guide/ags/cli-app.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'docs/guide') diff --git a/docs/guide/ags/cli-app.md b/docs/guide/ags/cli-app.md index ceed56a..93f9901 100644 --- a/docs/guide/ags/cli-app.md +++ b/docs/guide/ags/cli-app.md @@ -95,6 +95,42 @@ ags -m "return 'hello';" # hello ``` +## Toggling Windows by their name + +In order for AGS to know about your windows, you have to register them. +You can do this by specifying a **unique** `name` and calling `App.add_window` + +```tsx +import { App } from "astal" + +function Bar() { + return App.add_window(self)}> + + +} +``` + +You can also invoke `App.add_window` by simply passing the `App` to the `application` prop. + +```tsx +import { App } from "astal" + +function Bar() { + return + + +} +``` + +:::warning +When assigning the `application` prop make sure `name` comes before. +Props are set sequentially and if name is applied after application it won't work. +::: + +```sh +ags -t Bar +``` + ## App without AGS As mentioned before AGS is only a scaffolding tool. You can setup -- cgit v1.2.3 From e8536ed29caca7b6fc7ef582a2cc31dfc8317c8d Mon Sep 17 00:00:00 2001 From: Aylur <104676705+Aylur@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:46:39 +0200 Subject: Update cli-app.md highlight relative lines --- docs/guide/ags/cli-app.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/guide') diff --git a/docs/guide/ags/cli-app.md b/docs/guide/ags/cli-app.md index 93f9901..9d5d21d 100644 --- a/docs/guide/ags/cli-app.md +++ b/docs/guide/ags/cli-app.md @@ -100,7 +100,7 @@ ags -m "return 'hello';" In order for AGS to know about your windows, you have to register them. You can do this by specifying a **unique** `name` and calling `App.add_window` -```tsx +```tsx {4} import { App } from "astal" function Bar() { @@ -112,7 +112,7 @@ function Bar() { You can also invoke `App.add_window` by simply passing the `App` to the `application` prop. -```tsx +```tsx {4} import { App } from "astal" function Bar() { -- cgit v1.2.3 From dfc240d66e818044a24520726aef4e8e113a6dd7 Mon Sep 17 00:00:00 2001 From: Aylur Date: Thu, 3 Oct 2024 21:43:52 +0000 Subject: docs: window toggling --- docs/guide/ags/cli-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/guide') diff --git a/docs/guide/ags/cli-app.md b/docs/guide/ags/cli-app.md index 9d5d21d..ec6d174 100644 --- a/docs/guide/ags/cli-app.md +++ b/docs/guide/ags/cli-app.md @@ -112,7 +112,7 @@ function Bar() { You can also invoke `App.add_window` by simply passing the `App` to the `application` prop. -```tsx {4} +```tsx {4} import { App } from "astal" function Bar() { -- cgit v1.2.3