Skip to content

Commit

Permalink
Merge branch 'main' into feat/gtk4
Browse files Browse the repository at this point in the history
  • Loading branch information
Aylur committed Nov 2, 2024
2 parents 031321b + d47b470 commit cdaf890
Show file tree
Hide file tree
Showing 60 changed files with 3,102 additions and 387 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: [aylur]
github: [aylur, kotontrion]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: aylur
Expand Down
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Contributing

You can contribute by:

- [Suggesting new features](https://github.com/Aylur/astal/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=)
- [Reporting bugs](https://github.com/Aylur/astal/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=)
- Improving docs with additional contexts and examples
Expand All @@ -18,9 +19,11 @@ Write libraries preferably in Vala. Only choose C if some dependency is only ava
## Todo

Planned features, you could help with:

- [niri ipc library](https://github.com/Aylur/astal/issues/8)
- sway ipc library
- greetd ipc library
- core: http request library, abstraction over libsoup included (mostly to be used in gjs and lua)
- core: notification sending, libnotify clone [#26](https://github.com/Aylur/astal/issues/26)
- http request library abstraction over libsoup (mostly to be used in gjs and lua)
- notification sending libnotify clone [#26](https://github.com/Aylur/astal/issues/26)
- setting up [uncrustify](https://github.com/uncrustify/uncrustify) for Vala
- bluetooth custom errordomains, currently every error is simply Error
7 changes: 7 additions & 0 deletions docs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ in
description = "DBus proxy for bluez";
version = ../lib/bluetooth/version;
}}
${genLib {
flakepkg = "cava";
gir = "Cava";
description = "Audio visualization library using cava";
version = ../lib/cava/version;
authors = "kotontrion";
}}
${genLib {
flakepkg = "hyprland";
gir = "Hyprland";
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sudo pacman -Syu meson vala gtk3 gtk-layer-shell gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac gtk3-devel gtk-layer-shell-devel gobject-introspection-devel
sudo dnf install meson vala valadoc gtk3-devel gtk-layer-shell-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
27 changes: 19 additions & 8 deletions docs/guide/libraries/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sudo pacman -Syu meson vala json-glib gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac json-glib-devel gobject-introspection-devel
sudo dnf install meson vala valadoc json-glib-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down Expand Up @@ -55,8 +55,9 @@ astal-apps --help
import Apps from "gi://AstalApps"

const apps = new Apps.Apps({
includeEntry: true,
includeExecutable: true,
nameMultiplier: 2,
entryMultiplier: 0,
executableMultiplier: 2,
})

for (const app of apps.fuzzy_query("spotify")) {
Expand All @@ -68,8 +69,9 @@ for (const app of apps.fuzzy_query("spotify")) {
from gi.repository import AstalApps as Apps

apps = Apps.Apps(
include_entry=True,
include_executable=True,
name_multiplier=2,
entry_multiplier=0,
executable_multiplier=2,
)

for app in apps.fuzzy_query("obsidian"):
Expand All @@ -81,8 +83,9 @@ for app in apps.fuzzy_query("obsidian"):
local Apps = require("lgi").require("AstalApps")

local apps = Apps.Apps({
include_entry = true,
include_executable = true,
name_multiplier = 2,
entry_multiplier = 0,
executable_multiplier = 2,
})

for _, app in ipairs(apps:fuzzy_query("lutris")) do
Expand All @@ -91,7 +94,15 @@ end
```

```vala [<i class="devicon-vala-plain"></i> Vala]
// Not yet documented, contributions are appreciated
var apps = new AstalApps.Apps() {
name_multiplier = 2,
entry_multiplier = 0,
executable_multiplier = 2,
};
foreach (var app in apps.fuzzy_query("firefox")) {
print(app.name);
}
```

:::
2 changes: 1 addition & 1 deletion docs/guide/libraries/battery.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sudo pacman -Syu meson vala json-glib gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac json-glib-devel gobject-introspection-devel
sudo dnf install meson vala valadoc json-glib-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/libraries/bluetooth.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sudo pacman -Syu meson vala gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac gobject-introspection-devel
sudo dnf install meson vala valadoc gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
91 changes: 91 additions & 0 deletions docs/guide/libraries/cava.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Cava

Audio visualizer using [cava](https://github.com/karlstav/cava).

## Installation

1. install dependencies

Note that it requires [libcava](https://github.com/LukashonakV/cava), a fork of cava, which provides cava as a shared library.

:::code-group

```sh [<i class="devicon-archlinux-plain"></i> Arch]
sudo pacman -Syu meson vala gobject-introspection
paru -S libcava
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
# Not yet documented
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
# Not yet documented
```

:::

2. clone repo

```sh
git clone https://github.com/aylur/astal.git
cd astal/lib/cava
```

3. install

```sh
meson setup build
meson install -C build
```

:::tip
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:

```sh
meson setup --prefix /usr build
```

:::

## Usage

You can browse the [Cava reference](https://aylur.github.io/libastal/cava).

### CLI

There is no CLI for this library, use the one provided by cava.

```sh
cava
```

### Library

:::code-group

```js [<i class="devicon-javascript-plain"></i> JavaScript]
import Cava from "gi://AstalCava"

const cava = Cava.get_default()

cava.connect("notify::values", () => {
print(cava.get_values())
})
```

```py [<i class="devicon-python-plain"></i> Python]
# Not yet documented
```

```lua [<i class="devicon-lua-plain"></i> Lua]
-- Not yet documented
```

```vala [<i class="devicon-vala-plain"></i> Vala]
// Not yet documented
```

:::
2 changes: 1 addition & 1 deletion docs/guide/libraries/hyprland.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sudo pacman -Syu meson vala json-glib gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac json-glib-devel gobject-introspection-devel
sudo dnf install meson vala valadoc json-glib-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/libraries/mpris.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sudo pacman -Syu meson vala gvfs json-glib gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac gvfs json-glib-devel gobject-introspection-devel
sudo dnf install meson vala valadoc gvfs json-glib-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/libraries/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sudo pacman -Syu meson vala libnm gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac NetworkManager-libnm-devel gobject-introspection-devel
sudo dnf install meson vala valadoc NetworkManager-libnm-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/libraries/notifd.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sudo pacman -Syu meson vala gdk-pixbuf2 json-glib gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac gdk-pixbuf2-devel json-glib-devel gobject-introspection-devel
sudo dnf install meson vala valadoc gdk-pixbuf2-devel json-glib-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/libraries/powerprofiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sudo pacman -Syu meson vala json-glib gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac json-glib-devel gobject-introspection-devel
sudo dnf install meson vala valadoc json-glib-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/libraries/wireplumber.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sudo pacman -Syu meson vala wireplumber gobject-introspection
```

```sh [<i class="devicon-fedora-plain"></i> Fedora]
sudo dnf install meson gcc valac wireplumber-devel gobject-introspection-devel
sudo dnf install meson vala valadoc wireplumber-devel gobject-introspection-devel
```

```sh [<i class="devicon-ubuntu-plain"></i> Ubuntu]
Expand Down
Loading

0 comments on commit cdaf890

Please sign in to comment.