https://github.com/cacilhas/resolution
crate to retrieve screen resolution/dimensions on Linux, macOS, and Windows
https://github.com/cacilhas/resolution
Last synced: about 1 year ago
JSON representation
crate to retrieve screen resolution/dimensions on Linux, macOS, and Windows
- Host: GitHub
- URL: https://github.com/cacilhas/resolution
- Owner: cacilhas
- License: other
- Created: 2023-05-21T00:12:35.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-11T18:25:27.000Z (over 1 year ago)
- Last Synced: 2025-05-07T23:07:33.112Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: COPYING
Awesome Lists containing this project
README
[COPYING]: https://github.com/cacilhas/resolution/blob/master/COPYING
[The 3-Clause BSD License]: https://opensource.org/licenses/BSD-3-Clause
# Resolution
Crate to retrieve screen resolution/dimensions on Linux, macOS, and Windows.
## Rational
I have rewrite this same code so many times that it justifies existing.
## Install
```sh
cargo add resolution
```
## Interface
- `resolution::current_resolution() -> Result<(i32, i32), resolution::ResolutionError>`
It receives no parameter and returns current screen’s `(width, height)`.
## License
- [COPYING][]
- [The 3-Clause BSD License][]