No description
- Rust 94.5%
- Nix 5.5%
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| rustfmt.toml | ||
Komlesukker
The plan for this project is to create a CLI that can read from the Nightscout API and output the response. For now it always gets the first entry and writes it to stdout in the format that Waybar expects from their custom modules. I use this as a custom module in my own Waybar, but the plan is to make it more versatile over time.
For now, you can build the package and call the binary in the Waybar module as specified below.
With NixOS
You can just add this flake as an input to your config flake, and add the package.
inputs = {
komlesukker = {
url = "git+ssh://git@git.perprogramming.me:222/phjorgensen/komlesukker.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
# In some module
environment.systemPackages = [
inputs.komlesukker.packages.${system}.default
];
Build without NixOS
Clone the repo and run:
cargo b --release
Add the komlesukker binary somewhere in the PATH.
Waybar module
"custom/bs": {
"return-type": "json",
"exec-if": "which komlesukker",
"exec": "komlesukker",
"on-click": "komlesukker --open-in-browser",
"on-click-right": "komlesukker --toggle-privacy",
"escape": false,
"tooltip": true,
"interval": 60,
}