A fast, Raycast-style launcher backend for Wayland, written in Rust. Frontends are thin
clients that talk to hyprbeamd over a Unix socket.
frontend ──unix socket (msgpack frames)──▶ hyprbeamd
├─ in-memory indexes (inotify / IPC-driven, never rescanned per keystroke)
├─ nucleo fuzzy matcher + decaying frecency
├─ built-ins: apps · calculator · niri windows
└─ plugins: long-lived child processes (NDJSON over stdio), with timeouts
Typical full round trip from client to daemon and back is about 25 µs at p50 and under 100 µs at p99
(hyprbeam bench). Indexing 50 desktop files takes about 2 ms at startup.
| crate | what |
|---|---|
crates/proto |
wire types + framing, shared by daemon and clients |
crates/core |
Engine, Provider trait, frecency, .desktop parser, built-in providers |
crates/daemon |
hyprbeamd: tokio server, query streaming/cancellation, plugin manager |
crates/icons |
bundled default SVG icons (written to ~/.cache/hyprbeam/icons/ on first use) and the shared cache directory, used by the plugins |
crates/cli |
hyprbeam: debug client (query, activate, repl, bench, reload, ping) and pipe, a JSON bridge for frontends |
cargo install --root ~/.local --path crates/daemon && cargo install --root ~/.local --path crates/cli
cp dist/systemd/hyprbeam.{socket,service} ~/.config/systemd/user/
systemctl --user enable --now hyprbeam.socket # daemon starts on first connection
hyprbeam q fireThe daemon needs NIRI_SOCKET / WAYLAND_DISPLAY in the systemd user environment, which niri
exports by default.
Each frame is a big-endian u32 length followed by a MessagePack map (named fields). See
crates/proto/src/lib.rs.
Requests (type tag): query {id, text, limit}, activate {item, action?}, reload, ping.
Responses: results {id, items, done}, activated, reloaded, pong, error {message}.
- A query may produce several
resultsframes. Each one replaces the previous list, and the last hasdone: true. Built-in results always arrive first, and plugin results follow as they come in. - A new
queryon the same connection cancels the previous one. Clients should still drop any frame whoseidis not the latest. items[].highlightsare char indices intotitle.items[].actionsare secondary actions; pass one asactivate.action.items[].dataholds provider-specific string fields for frontends. A frontend that recognisesdata.kindmay handle the item itself instead of sendingactivate.
Frontends that can't do binary framing (QML, shell scripts) can run hyprbeam pipe instead: it holds
one daemon connection and speaks the same messages as JSON, one request per stdin line and one
response per stdout line (e.g. {"type":"query","id":1,"text":"fire"}). It exits 0 when stdin
closes; if the daemon is unreachable or goes away it prints an error line and exits 1.
Put a manifest in ~/.config/hyprbeam/plugins/<name>/plugin.json (or plugins/<name>.json):
{ "name": "bm", "exec": ["./bookmarks.py"], "prefix": "bm", "timeout_ms": 200, "min_chars": 0, "lazy": false }exec: argv.~/expands to$HOME, and other relative paths are resolved against the manifest directory. The systemd unit'sPATHlacks~/.local/bin, so use~/.local/bin/….prefix(optional): the plugin only seesbm <text>and receives<text>. A prefixed query is scoped to that plugin, and its results are boosted.timeout_ms: replies arriving later are dropped. The UI is never blocked waiting for them.lazy: by default plugins start with the daemon, so the first query doesn't pay for process startup.
The plugin reads one JSON object per line on stdin and writes one per line on stdout:
score is optional; without it the daemon fuzzy-scores title itself. Item ids become
<plugin name>:<key>, and frecency applies to them as well. Crashed plugins restart on the next
query (at most once per second). See examples/plugins/bookmarks/.
For Helide/Helium. One ranked list mixed into normal search, deduplicated so an open tab
beats a bookmark, which beats history. The plugin only finds things. Each item carries data
for the frontend, which opens it itself, and Activate on these items returns an error:
data.kind |
fields | frontend opens it with (Quickshell HyprbeamMenu) |
|---|---|---|
browser-tab |
tab_id, window_id, title, url |
island-tabs-ctl activate (switch to the open tab) |
browser-url |
url |
helium-browser <url>; action here uses the address bar socket |
Both kinds have a copy action, and browser-url also has here.
cargo install --root ~/.local --path crates/plugin-helide
mkdir -p ~/.config/hyprbeam/plugins/helide && cp dist/plugins/helide/plugin.json ~/.config/hyprbeam/plugins/helide/
hyprbeam reload| source | read from | kept fresh by |
|---|---|---|
| tabs | $XDG_RUNTIME_DIR/island-tabs.json, written by the Island Tabs extension's native host. The visible tab of each window is skipped, since it's already a niri window. |
inotify |
| bookmarks | <profile>/Bookmarks (JSON) |
inotify |
| history | <profile>/History (SQLite, read with immutable=1, because the browser holds a lock) |
inotify, at most every 3 s |
- Filtering: a match must be close to a perfect one and coherent: few contiguous runs, or every
run starting a word, so
ghmatches GitHub andytmatches YouTube. History is weighted below apps, then by visits, typed count and recency. - Icons:
iconis an absolute path. Favicons are cached per domain in~/.cache/hyprbeam/favicons/<host>.png. Missing ones are copied out of the profile'sFaviconsdatabase (refreshed after 30 days, never read while searching), then Island Tabs' own~/.cache/island-tabs/<host>.pngis tried. Nothing is fetched from the network. With no favicon,file://URLs get a file-type icon and everything else the bundled web page icon. - Env:
HELIDE_USER_DATA_DIR(default~/.config/net.imput.helium),HELIDE_PROFILE(default: the last used profile),HELIDE_TABS_FILE,HELIDE_MIN_QUALITY(default0.5).
Indexes file and directory names under ~/Downloads, ~/Documents, ~/Pictures and ~/Videos,
and nothing else. Like helide it only finds: items carry data.kind = file with path, name,
dir and is_dir ("true"/"false"), plus reveal and copy actions. Activate returns an error.
cargo install --root ~/.local --path crates/plugin-files
mkdir -p ~/.config/hyprbeam/plugins/files && cp dist/plugins/files/plugin.json ~/.config/hyprbeam/plugins/files/
cp dist/plugins/files/files.toml ~/.config/hyprbeam/files.toml # optional: every key has a default
hyprbeam reloadConfig is ~/.config/hyprbeam/files.toml (or $HYPRBEAM_FILES_CONFIG); a missing file means defaults,
and an invalid one is logged and ignored. Unknown keys are an error.
| key | default | |
|---|---|---|
roots |
the four dirs above | Must be one of them or inside one. Roots are canonicalised, so .. and symlinks can't escape. Others are skipped with a warning. |
exclude |
node_modules, target, __pycache__, *.part, *.crdownload, *.tmp, *~ |
Globs on file names. A directory match skips the subtree. |
include_hidden |
false |
dotfiles and dot-directories |
include_dirs |
true |
directories as results |
max_depth |
12 |
levels below a root |
max_entries |
100000 |
the index is partial beyond this |
limit |
8 |
results per query |
min_quality |
0.5 |
how close to a perfect match a result must be (0 to 1) |
Results get a bundled icon by file type (folder, image, video, audio, PDF, document, spreadsheet, presentation, archive, code, generic file).
Symlinks are never followed. The index is built at startup (about a millisecond per 500 entries) and rebuilt 1.5 s after the last inotify change under a root. Names match fully, a match only through a parent directory name counts 0.6, and files modified recently get up to a 25% boost.
Implement hyprbeam_core::Provider and add it to providers::defaults(). query runs on every
keystroke, so it must only read in-memory snapshots (Arc<Vec<…>> swapped by a background
watcher) with pre-converted Utf32String haystacks.
| var | default |
|---|---|
HYPRBEAM_SOCKET |
$XDG_RUNTIME_DIR/hyprbeam.sock |
HYPRBEAM_TERMINAL |
derived from $TERMINAL (for Terminal=true apps) |
| state | $XDG_STATE_HOME/hyprbeam/frecency.mpk |