Krolyxon
Commit a3246e9

Branches

Refs →

budctla3246e9

README, and a desktop entry for budctl-gui

What budctl is, how to install it, the command line, the desktop app
with its keys and palette file, and where the protocol notes are.
contrib/budctl.desktop launches budctl-gui from app launchers (it
passes desktop-file-validate). .gitignore skips *.log, like the debug
logs of hardware runs.
Author
krolyxon
Date
2026-10-28 01:17 +0530
Parent
c7666c2
Commit
a3246e926e7a051d508da1d02bb194cc4b1bc7ce

+116 −0

3 files changed

  1. M .gitignore +1 −0
  2. A README.md +104 −0
  3. A contrib/budctl.desktop +11 −0
M .gitignore View
@@ -1 +1,2 @@
11 /target
2+*.log
A README.md View
@@ -0,0 +1,104 @@
1+# budctl
2+
3+Control your wireless earbuds from Linux, without the vendor app: noise control, EQ, game mode,
4+touch controls, battery and more. There is a command-line tool, `budctl`, and a desktop app,
5+`budctl-gui`, both built on the same library.
6+
7+- No telemetry and no account. budctl talks to your buds over Bluetooth, through BlueZ.
8+- The settings live on the buds, so budctl works alongside the phone app.
9+
10+**Supported buds:** realme Buds T310. More are added as the author gets them.
11+
12+## Install
13+
14+You need Rust 1.88 or newer, BlueZ, and for the desktop app a Wayland desktop.
15+
16+```sh
17+cargo install --path crates/budctl-cli # budctl
18+cargo install --path crates/budctl-gui # budctl-gui
19+cp contrib/budctl.desktop ~/.local/share/applications/
20+```
21+
22+Pair the buds and connect them in your Bluetooth settings first.
23+
24+## Command line
25+
26+```sh
27+budctl list # paired buds, and whether budctl knows them
28+budctl status # battery, noise control, EQ, switches
29+budctl anc off|on|transparency # noise control
30+budctl anc light|medium|deep # noise cancelling, at this strength
31+budctl eq # the EQ presets, and the one in use
32+budctl eq deep-bass # select a preset
33+budctl eq custom-4 50=+3 16000=-2 # change bands of a custom preset (dB)
34+budctl game on|off # game mode (low latency)
35+budctl set bass-boost|spatial|wind|dual on|off
36+budctl bass 2 # bass level, -5 to +5
37+budctl touch # what each tap and hold does
38+budctl touch left triple-tap previous # give a gesture an action (--dry-run first, if you like)
39+budctl touch cycle off anc # the modes a hold steps through
40+budctl find start --yes # ring the buds (loud: take them out of your ears)
41+budctl find stop
42+```
43+
44+- `--json` prints machine-readable output for scripts and status bars (`"schema": 1`).
45+- `--debug` hex-dumps every frame sent and received, on stderr.
46+- `--device <MAC>` picks the buds when more than one supported pair is connected.
47+
48+Exit codes:
49+
50+| Code | Meaning |
51+|---|---|
52+| 0 | success |
53+| 1 | usage error |
54+| 2 | buds not found or not connected |
55+| 3 | control channel busy |
56+| 4 | the buds rejected the command or did not answer |
57+
58+## Desktop app
59+
60+`budctl-gui` has five pages:
61+
62+- **Overview:** battery, noise control, the switches.
63+- **Equalizer:** presets, the bands of your custom presets, the bass level.
64+- **Gestures:** what each tap and hold does on each bud, and what a hold steps through.
65+- **Earbud settings:** find my earbuds, firmware, audio codec.
66+- **App settings.**
67+
68+The app connects when it needs to, and frees the buds' control channel 10 s after your last
69+change, so other apps can use it. A change shows "Saving…" until the buds confirm it.
70+
71+The mouse works everywhere. Vim-like keys work on top of it (press `?` in the window):
72+
73+| Keys | What they do |
74+|---|---|
75+| `j` `k`, arrows, Tab | move the cursor |
76+| `gg` `G` | first / last item |
77+| `h` `l` | previous / next choice, switch off / on; `l` opens a row's page |
78+| Enter, Space | toggle, step through the choices, or open |
79+| `J` `K`, Ctrl+Tab, `gt` `gT` | next / previous page |
80+| `1` … `5` | go to a page |
81+| `r` | read the buds again |
82+| Esc | hide the cursor |
83+| `q` | quit |
84+
85+The cursor shows only after you press a key, and the first key only shows it.
86+
87+**Colors:** a built-in dark palette with a red accent, or a [matugen](https://github.com/InioX/matugen)
88+palette: `--theme <file>`, else `~/.config/budctl/theme.json`. The file is JSON with these keys, all
89+optional: `bg`, `fg`, `primary`, `primaryFg`, `primaryContainer`, `secondary`, `surfaceLow`,
90+`surface`, `surfaceHigh`, `surfaceHighest`, `outlineVariant`, `surfaceVariantFg`, `err`. It is read
91+again whenever the window gets focus, so a new wallpaper's colors show up there too.
92+
93+Other options: `--demo` shows made-up buds without Bluetooth; `--debug` and `--device` work as in
94+the command-line tool.
95+
96+## How it works
97+
98+budctl speaks the buds' own control protocol over an RFCOMM socket. What is known about it, and
99+how sure, is written down in [`docs/protocol/`](docs/protocol/): the
100+[transport](docs/protocol/transport.md) and the [realme Buds T310](docs/protocol/realme_t310.md).
101+
102+## License
103+
104+GPL-3.0-or-later. See [LICENSE](LICENSE).
A contrib/budctl.desktop View
@@ -0,0 +1,11 @@
1+[Desktop Entry]
2+Type=Application
3+Name=budctl
4+GenericName=Earbuds
5+Comment=Control your wireless earbuds: noise control, EQ, gestures, battery
6+Exec=budctl-gui
7+Icon=audio-headphones
8+Terminal=false
9+Categories=Settings;HardwareSettings;
10+Keywords=earbuds;headphones;bluetooth;anc;noise;equalizer;gestures;
11+StartupWMClass=budctl