Skip to content
DontBlameMeDevPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Timed

Timed

A Noctalia plugin for countdown timers started from the bar or launcher, written in Rust with noctalia-rs.

See timed/README.md for usage and duration formats.

Install

noctalia msg plugins source add timed git https://github.com/DontBlameMeDev/timed.git
noctalia msg plugins enable dontblameme/timed

The plugin directory ships a static x86_64 Linux helper. On another architecture, build it yourself, refresh timed/, and add the repository as a path source. A path source scans <dir>/<plugin>/plugin.toml, so point it at the parent of timed/, not at timed/ itself:

cargo build --release --target x86_64-unknown-linux-musl
./target/x86_64-unknown-linux-musl/release/timed emit timed timed-helper
cp target/x86_64-unknown-linux-musl/release/timed timed/timed-helper
noctalia msg plugins source add timed path "$PWD"

Then enable dontblameme/timed.

Nix

nix build
noctalia msg plugins source add timed path "$(readlink -f result)"

The flake builds the helper and emits the plugin into result/timed/, so the result directory is a source root. It also provides the development shell and checks:

nix develop
nix flake check

Layout

Path What it is
noctalia.toml Plugin manifest source: metadata, settings, entries
src/ The handlers: service, widget, panel, launcher, plus duration, timer state, and colors
timed/ The plugin Noctalia loads, generated by emit and committed
bench/ The Luau reference implementation and the paired benchmark
assets/ Plugin README and images

timed/plugin.toml is generated. Change noctalia.toml or src/, then regenerate:

cargo run --release -- emit timed timed-helper

Development

cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --release
python3 .github/scripts/check-catalog.py
cargo deny check

timed/ must match a fresh emit, which CI checks with diff. The formatting, lint, and dependency rules come from ~/projects/project_templates/rust: .rustfmt.toml, .clippy.toml, and .deny.toml. Format with stable rustfmt. The nightly-only keys in .rustfmt.toml are ignored, so stable and nightly produce the same file except for import grouping.

Release

Cut a release from a green main with one dispatch:

gh workflow run release.yml -f bump=patch

Or rehearse it without pushing, tagging, or publishing:

gh workflow run release.yml -f bump=patch -f dry_run=true

The workflow bumps Cargo.toml and catalog.toml, runs formatting, clippy, tests, the catalog check, and the emit diff, builds the static musl helper, regenerates timed/, commits the bump and the helper, tags v<version>, and publishes a GitHub release with the helper attached. It needs the RELEASE_DEPLOY_KEY secret, a write deploy key that bypasses the ruleset on main.

To rehearse locally, do the same steps in a scratch copy:

python3 .github/scripts/bump-version.py patch
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --release
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=rust-lld \
  CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C link-self-contained=yes" \
  cargo build --release --target x86_64-unknown-linux-musl
./target/x86_64-unknown-linux-musl/release/timed emit timed timed-helper
cp target/x86_64-unknown-linux-musl/release/timed timed/timed-helper
python3 .github/scripts/check-catalog.py

nix develop includes the musl target, so the static build needs no extra toolchain. Noctalia picks the release up from the git source on its next update, or with noctalia msg plugins update timed.

Benchmark

The benchmark runs the original Luau entries and the Rust handlers on the same fixtures, compares their ops, and reports per-event medians:

cargo build --release
cargo run --release -p timed-bench -- \
  --samples 200 --warmup 20 --batch 10 \
  --helper timed/timed-helper

It needs luau on PATH (or --luau <path>) for the reference side.

See docs/noctalia-plugins.md for the Noctalia plugin API documentation links.

License

GPL-3.0-or-later. The static helper links noctalia-rs, which is also GPL-3.0-or-later, so the plugin cannot ship under a more permissive license.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages