https://github.com/bash/mundy
Reads various system-level accessibility and UI preferences ๐
https://github.com/bash/mundy
Last synced: 5 months ago
JSON representation
Reads various system-level accessibility and UI preferences ๐
- Host: GitHub
- URL: https://github.com/bash/mundy
- Owner: bash
- License: apache-2.0
- Created: 2024-10-13T20:46:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-28T13:21:12.000Z (over 1 year ago)
- Last Synced: 2024-11-01T13:03:31.667Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 182 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
README
# mundy ๐
[](https://docs.rs/mundy)
[](https://crates.io/crates/mundy)
Your friendly neighbourhood ~~whale~~ crate for reading various system-level
accessibility and UI preferences across platforms ๐
The following preferences are supported:
* [`AccentColor`](https://docs.rs/mundy/latest/mundy/struct.AccentColor.html)โThe user's current system wide accent color preference.
* [`ColorScheme`](https://docs.rs/mundy/latest/mundy/enum.ColorScheme.html)โThe user's preference for either light or dark mode.
* [`Contrast`](https://docs.rs/mundy/latest/mundy/enum.Contrast.html)โThe user's preferred contrast level.
* [`ReducedMotion`](https://docs.rs/mundy/latest/mundy/enum.ReducedMotion.html)โThe user's reduced motion preference.
* [`ReducedTransparency`](https://docs.rs/mundy/latest/mundy/enum.ReducedTransparency.html)โThe user's reduced transparency preference.
* [`DoubleClickInterval`](https://docs.rs/mundy/latest/mundy/struct.DoubleClickInterval.html)โThe maximum amount of time allowed between the first and second click.
## Example
```rust,no_run
use mundy::{Preferences, Interest};
use futures_lite::StreamExt as _;
// Interest tells mundy which preferences it should monitor for you.
// use `Interest::All` if you're interested in all preferences.
let mut stream = Preferences::stream(Interest::AccentColor);
async {
while let Some(preferences) = stream.next().await {
eprintln!("accent color: {:?}", preferences.accent_color);
}
};
```
## [Docs](https://docs.rs/mundy)
## [Examples](./examples/readme.md)
## License
Licensed under the Apache License, Version 2.0 ([license.txt](license.txt) or )
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
licensed as above, without any additional terms or conditions.