No description
Find a file
Vincent S. d8ad95ebca
All checks were successful
CI / fmt (push) Successful in 1m18s
CI / build (push) Successful in 2m41s
ci: add Forgejo Actions build/test/fmt workflow
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 00:32:48 +02:00
.forgejo/workflows ci: add Forgejo Actions build/test/fmt workflow 2026-06-28 00:32:48 +02:00
.githooks chore: add pre-commit hook running clippy and tests 2026-06-03 21:09:43 +02:00
alfred [UPDATE] Runned fmt 2026-06-28 00:30:04 +02:00
alfred-core [UPDATE] Runned fmt 2026-06-28 00:30:04 +02:00
alfred-ytm [UPDATE] Runned fmt 2026-06-28 00:30:04 +02:00
.gitignore chore: initial scaffold 2026-05-25 17:45:34 +02:00
Cargo.lock feat(music): YouTube Music search/library via the alfred-ytm worker 2026-06-19 19:50:19 +02:00
Cargo.toml feat(music): YouTube Music search/library via the alfred-ytm worker 2026-06-19 19:50:19 +02:00
CLAUDE.md feat(build): gate gpu/media modules behind Cargo features 2026-06-27 23:49:57 +02:00
README.md chore: improve docs, health checks, and shutdown handling 2026-05-26 23:04:44 +02:00

alfred

A personal system telemetry daemon for the Linux desktop.

Architecture

alfred serve                      # persistent daemon, managed by systemd --user
alfred get <module>               # one-shot query for scripts/waybar/debugging
alfred stream <module>            # optional long-lived NDJSON client
alfred status                     # check if daemon is running
alfred completions zsh > _alfred  # generate shell completion

Modules

Module Source Interval
system /proc/stat, /proc/meminfo, sysfs hwmon 2s
gpu NVML (libnvidia-ml) 5s
audio wpctl / pactl subprocesses 2s
media D-Bus MPRIS via zbus 5s
network /sys/class/net 5s
storage statvfs + sysfs hwmon 30s
llama HTTP localhost:8080/metrics 2s
ytmd YTMD companion HTTP + Socket.IO 5s
hyprland Hyprland IPC 1s

API

GET  /:module            → latest cached JSON (one-shot)
GET  /stream/:module     → newline-delimited JSON stream (push on update)
POST /control/:module/:action → trigger an action, forces immediate refresh

Config

~/.config/alfred/config.toml

Waybar integration

Waybar 0.15.0 has been more reliable here with normal polling than with long-lived interval: 0 stream consumers, so the recommended setup is:

"custom/system": {
    "interval": 2,
    "exec": "alfred get system",
    "return-type": "json",
    "format": "{}"
}

alfred stream <module> is still available for other long-lived consumers.

Systemd

~/.config/systemd/user/alfred.service

Shell completions

Generate a zsh completion file:

alfred completions zsh > ~/.local/share/zsh/site-functions/_alfred

Then make sure that directory is in fpath before compinit, e.g. in ~/.zshrc:

fpath=(~/.local/share/zsh/site-functions $fpath)
autoload -U compinit
compinit