No description
  • Rust 94.5%
  • Nix 5.5%
Find a file
2026-06-04 21:42:44 +02:00
src Move TODOs to Obsidian 2026-06-04 21:42:44 +02:00
.gitignore Update .gitignore to ignore /result 2025-08-14 10:09:18 +02:00
Cargo.lock Add notify-rust crate 2026-05-08 13:06:40 +02:00
Cargo.toml Add notify-rust crate 2026-05-08 13:06:40 +02:00
default.nix Add notify-rust crate 2026-05-08 13:06:40 +02:00
flake.lock Initial commit 2025-08-13 21:27:18 +02:00
flake.nix Add openssl as dependency, remove unused self 2025-08-14 20:34:50 +02:00
README.md Update README 2026-05-08 13:02:55 +02:00
rustfmt.toml Fix the formatting issue with a rustfmt.toml file 2025-08-16 23:14:50 +02:00

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,
}