A rust freedesktop sound lookup implementation
Find a file
2026-02-10 14:21:21 +01:00
.forgejo migrate from github 2026-02-10 14:21:21 +01:00
benches test coverage 2025-04-17 13:03:12 +02:00
images containers work 2025-04-21 02:17:03 +02:00
src containers work 2025-04-21 02:17:03 +02:00
.envrc initial commit 2025-04-06 18:02:20 +02:00
.gitignore initial commit 2025-04-06 18:02:20 +02:00
Cargo.lock full implementation and cache 2025-04-07 15:44:23 +02:00
Cargo.toml typo :3 2026-02-08 15:20:00 +01:00
compose.yaml full implementation and cache 2025-04-07 15:44:23 +02:00
flake.lock initial commit 2025-04-06 18:02:20 +02:00
flake.nix containers work 2025-04-21 02:17:03 +02:00
justfile containers work 2025-04-21 02:17:03 +02:00
LICENSE initial commit 2025-04-06 18:02:20 +02:00
README.md containers work 2025-04-21 02:17:03 +02:00

freedesktop-sound

crates.io-badge Build Status codecov docs

This crate provides a freedesktop sound lookup implementation.

It exposes a single lookup function to find sound files based on their name and theme.

Example

Simple lookup:

The following snippet gets sound file from the default 'freedesktop' theme.

use freedesktop_sound::lookup;

let sound = lookup("bell").find();

Complex lookup

If you have specific requirements for your lookup you can use the provided builder functions:

use freedesktop_sound::lookup;

let sound = lookup("bell")
    .with_theme("oxygen")
    .find();

Cache:

If your application is going to repeat the same sound lookups multiple times you can use the internal cache to improve performance.

use freedesktop_sound::lookup;

let sound = lookup("bell")
    .with_theme("oxygen")
    .with_cache()
    .find();

Running tests

To run tests, it's recommended to use docker, there are images for fhs compliant and not compliant distributions:

just test