diff options
author | kotontrion <[email protected]> | 2024-10-10 11:28:11 +0200 |
---|---|---|
committer | kotontrion <[email protected]> | 2024-10-10 11:28:11 +0200 |
commit | 08f10ce3968166c55f5f2e3009415e4899e9a73b (patch) | |
tree | c6f914debe8f86e8ec7275f86a4181b20cf5f45a /docs/guide | |
parent | 10447f5abcb28f3df1544f1732f82d538130b3c9 (diff) | |
parent | 075c7e34aa0fbdc07c86965ab5a2ae79b92d3fd3 (diff) |
Merge branch 'main' into feat/cava
Diffstat (limited to 'docs/guide')
-rw-r--r-- | docs/guide/ags/cli-app.md | 36 | ||||
-rw-r--r-- | docs/guide/ags/theming.md | 14 | ||||
-rw-r--r-- | docs/guide/getting-started/nix.md | 27 |
3 files changed, 65 insertions, 12 deletions
diff --git a/docs/guide/ags/cli-app.md b/docs/guide/ags/cli-app.md index ceed56a..ec6d174 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 {4} +import { App } from "astal" + +function Bar() { + return <window name="Bar" setup={self => App.add_window(self)}> + <box /> + </window> +} +``` + +You can also invoke `App.add_window` by simply passing the `App` to the `application` prop. + +```tsx {4} +import { App } from "astal" + +function Bar() { + return <window name="Bar" application={App}> + <box /> + </window> +} +``` + +:::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 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 [<i class="devicon-archlinux-plain"></i> Arch] sudo pacman -Syu dart-sass ``` -```sh [Fedora] +```sh [<i class="devicon-fedora-plain"></i> Fedora] npm install -g sass # not packaged on Fedora ``` -```sh [Alpine] -sudo apk add dart-sass -``` - -```sh [Ubuntu] +```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu] npm install -g sass # not packaged on Ubuntu ``` -```sh [openSUSE] -sudo zypper install dart-sass -``` - ::: Importing `scss` files will simply return transpiled css. 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 [<i class="devicon-nixos-plain"></i> 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 [<i class="devicon-nixos-plain"></i> home.nix] +home.packages = [ inputs.ags.packages.${pkgs.system}.notifd ]; +``` + +```sh [<i class="devicon-bash-plain"></i> sh] +astal-notifd --help +``` + +::: |