https://github.com/will/detectbg
standalone program to detect terminal background light/dark
https://github.com/will/detectbg
Last synced: 12 months ago
JSON representation
standalone program to detect terminal background light/dark
- Host: GitHub
- URL: https://github.com/will/detectbg
- Owner: will
- License: gpl-3.0
- Created: 2023-11-08T18:48:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-08T18:50:07.000Z (over 2 years ago)
- Last Synced: 2025-02-10T11:45:44.776Z (about 1 year ago)
- Language: Nix
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage
```bash
$ detectbg
$ detectbg [print-if-light default=light] [print-if-dark default=dark]
```
## Develop
- `nix develop`: opens up a `bash` shell with the bare minimum Rust toolset (`cargo` & `rustc`) by default
- `nix build` : builds the Rust project. Outputs the binary to `./result/bin/`
- `nix run`: runs the Rust program.
## Reference
1. [wiki/Flakes](https://nixos.wiki/wiki/Flakes)
2. [Fenix](https://github.com/nix-community/fenix) - used for managing Rust toolchains (read the `makeRustPlatform` example)
3. [rust-section of language frameworks](https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#cargo-features-cargo-features) - optional (use it for extending the template)