Krolyxon
Commit 1db9790

Branches

Refs →

budctl1db9790

The icon on the desktop too: install.sh, the PKGBUILD, the releases

The launcher entry named the stock audio-headphones icon. Now it names
budctl's own (docs/icon.svg, the Android app's launcher icon):

- The release tarballs carry it as budctl.svg.
- install.sh installs it to share/icons/hicolor/scalable/apps/ (and
  rebuilds the theme's icon cache if it has one), and --uninstall
  removes it. A release from before the icon installs without one.
  Tried from an unpacked bundle into a scratch prefix, with and without
  the icon, and uninstalled.
- The PKGBUILD installs it once a release carries it. It also moves to
  0.1.3, with the sums from that release's .sha256 files; makepkg built
  the package from it, and with the icon put in its place.
Author
krolyxon
Date
2026-11-01 23:28 +0530
Parent
698a1df
Commit
1db9790a9894870db997f64eaf52a1cf9dc8c50d

+36 −9

5 files changed

  1. M .github/workflows/release.yml +1 −0
  2. M CLAUDE.md +4 −2
  3. M contrib/arch/PKGBUILD +7 −3
  4. M contrib/budctl.desktop +1 −1
  5. M install.sh +23 −3
M .github/workflows/release.yml View
@@ -40,6 +40,7 @@ jobs:
4040 mkdir "$dir"
4141 cp target/release/budctl target/release/budctl-gui contrib/budctl.desktop install.sh README.md LICENSE "$dir/"
4242 cp crates/budctl-gui/fonts/OFL.txt "$dir/OFL-fonts.txt"
43+ cp docs/icon.svg "$dir/budctl.svg"
4344 tar -czf "$dir.tar.gz" "$dir"
4445 sha256sum "$dir.tar.gz" > "$dir.tar.gz.sha256"
4546 - uses: actions/upload-artifact@v7
M CLAUDE.md View
@@ -149,8 +149,10 @@ Exit codes:
149149
150150 - One version for the whole workspace (`Cargo.toml`), with a section per release in `CHANGELOG.md`.
151151 - To release: bump the version, add its `CHANGELOG.md` section, commit, then tag `vX.Y.Z` and push the tag. `.github/workflows/release.yml` checks the tag matches `Cargo.toml`, runs the tests, builds x86_64 and aarch64 on Ubuntu 22.04 (glibc builds; Wayland is loaded at runtime), and publishes the tarballs, their `.sha256` files and `install.sh`, with that changelog section as the notes.
152−- `install.sh` installs into `~/.local` by default: from a release download (`curl … | sh`), from the unpacked tarball it sits in, or from a checkout with `--source`. `--uninstall` removes the binaries and the launcher entry, never the user's config or log.
153−- `contrib/arch/PKGBUILD` (`budctl-bin`, not on the AUR) packages the release tarballs. After a release is published, bump its `pkgver` and take the sums from the release's `.sha256` files.
152+- The tarballs carry the binaries, `budctl.desktop`, the icon (`docs/icon.svg` as `budctl.svg`), `install.sh`, the README and the licenses.
153+- `install.sh` installs into `~/.local` by default: from a release download (`curl … | sh`), from the unpacked tarball it sits in, or from a checkout with `--source`. It puts the icon in `share/icons/hicolor/scalable/apps/` (a release from before the icon has none, and is installed without). `--uninstall` removes the binaries, the launcher entry and the icon, never the user's config or log.
154+- `contrib/arch/PKGBUILD` (`budctl-bin`, not on the AUR) packages the release tarballs, the icon too once a release carries it. After a release is published, bump its `pkgver` and take the sums from the release's `.sha256` files.
155+- The logo: `docs/icon.svg` (the LED battery ring, its last lit dot the red live dot, around a dot-matrix "b") is the launcher icon on both platforms; the Android app has the same dots as vector drawables (adaptive, plus a monochrome layer for themed icons). `docs/logo.svg` is the README's banner: the same emblem and "BUDCTL" in dot-matrix capitals.
154156 - `.github/workflows/ci.yml` runs fmt, clippy and the tests on every push to master.
155157
156158 ## License
M contrib/arch/PKGBUILD View
@@ -4,7 +4,7 @@
44 # .sha256 files (or run updpkgsums).
55
66 pkgname=budctl-bin
7−pkgver=0.1.2
7+pkgver=0.1.3
88 pkgrel=1
99 pkgdesc='Control wireless earbuds from Linux without the vendor app (CLI and Wayland GUI)'
1010 arch=('x86_64' 'aarch64')
@@ -19,13 +19,17 @@ conflicts=('budctl')
1919 options=('!strip' '!debug')
2020 source_x86_64=("budctl-$pkgver-x86_64.tar.gz::$url/releases/download/v$pkgver/budctl-x86_64-unknown-linux-gnu.tar.gz")
2121 source_aarch64=("budctl-$pkgver-aarch64.tar.gz::$url/releases/download/v$pkgver/budctl-aarch64-unknown-linux-gnu.tar.gz")
22−sha256sums_x86_64=('2d18a3ed9be4d142da9b077564ef7415da0d46c8a99661785da6310bf36e80d2')
23−sha256sums_aarch64=('8416202ad2b8f8814fae159aab2931c400afe52a3cb400c7eb9a7760d41fa5a0')
22+sha256sums_x86_64=('19766c16cec4206eed1b01620048e35d099d003a9bae03abd49aa5773ea1c897')
23+sha256sums_aarch64=('63319c112866f8d1b9068b0e8091ea90ffca608e0783a3d18b86180b84e4d08d')
2424
2525 package() {
2626 cd "budctl-$CARCH-unknown-linux-gnu"
2727 install -Dm755 budctl budctl-gui -t "$pkgdir/usr/bin/"
2828 install -Dm644 budctl.desktop -t "$pkgdir/usr/share/applications/"
29+ # The icon ships in the releases after 0.1.3; before, the launcher entry names a stock one.
30+ if [ -f budctl.svg ]; then
31+ install -Dm644 budctl.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/budctl.svg"
32+ fi
2933 install -Dm644 README.md -t "$pkgdir/usr/share/doc/budctl/"
3034 install -Dm644 OFL-fonts.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
3135 }
M contrib/budctl.desktop View
@@ -4,7 +4,7 @@ Name=budctl
44 GenericName=Earbuds
55 Comment=Control your wireless earbuds: noise control, EQ, gestures, battery
66 Exec=budctl-gui
7−Icon=audio-headphones
7+Icon=budctl
88 Terminal=false
99 Categories=Settings;HardwareSettings;
1010 Keywords=earbuds;headphones;bluetooth;anc;noise;equalizer;gestures;
M install.sh View
@@ -6,7 +6,8 @@
66 # ./install.sh --source in a checkout: builds with cargo, then installs
77 # ./install.sh --uninstall
88 #
9−# Installs into ~/.local by default (bin/ and share/applications/), so no root is needed.
9+# Installs into ~/.local by default (bin/, and the launcher entry and its icon in share/), so no
10+# root is needed.
1011
1112 set -eu
1213
@@ -25,7 +26,7 @@ Usage:
2526 install.sh --uninstall [--prefix DIR]
2627
2728 Options:
28− --prefix DIR Install into DIR/bin and DIR/share/applications (default: ~/.local)
29+ --prefix DIR Install into DIR/bin and DIR/share (default: ~/.local)
2930 --version X.Y.Z Download this release instead of the latest
3031 --source Build from this checkout with cargo instead of downloading
3132 --uninstall Remove what install.sh installed. Your config (~/.config/budctl)
@@ -77,6 +78,8 @@ done
7778
7879 BIN_DIR=$PREFIX/bin
7980 APP_DIR=$PREFIX/share/applications
81+ICON_THEME=$PREFIX/share/icons/hicolor
82+ICON_DIR=$ICON_THEME/scalable/apps
8083
8184 # Use sudo only when the prefix cannot be written as this user (such as /usr/local).
8285 SUDO=
@@ -90,7 +93,7 @@ if [ ! -w "$writable_dir" ] && [ "$(id -u)" -ne 0 ]; then
9093 fi
9194
9295 if [ "$ACTION" = uninstall ]; then
93− for file in "$BIN_DIR/budctl" "$BIN_DIR/budctl-gui" "$APP_DIR/budctl.desktop"; do
96+ for file in "$BIN_DIR/budctl" "$BIN_DIR/budctl-gui" "$APP_DIR/budctl.desktop" "$ICON_DIR/budctl.svg"; do
9497 if [ -e "$file" ]; then
9598 $SUDO rm -f "$file"
9699 say "Removed $file"
@@ -118,6 +121,7 @@ case "$FROM" in
118121 bundle)
119122 FILES=$SCRIPT_DIR
120123 DESKTOP=$SCRIPT_DIR/budctl.desktop
124+ ICON=$SCRIPT_DIR/budctl.svg
121125 ;;
122126 source)
123127 [ -f "$SCRIPT_DIR/Cargo.toml" ] || fail "--source needs a budctl checkout next to install.sh"
@@ -126,6 +130,7 @@ case "$FROM" in
126130 cargo build --release --locked --manifest-path "$SCRIPT_DIR/Cargo.toml" -p budctl -p budctl-gui
127131 FILES=$SCRIPT_DIR/target/release
128132 DESKTOP=$SCRIPT_DIR/contrib/budctl.desktop
133+ ICON=$SCRIPT_DIR/docs/icon.svg
129134 ;;
130135 download)
131136 case "$(uname -m)" in
@@ -155,6 +160,7 @@ case "$FROM" in
155160 tar -xzf "$WORK/$ARCHIVE" -C "$WORK"
156161 FILES=$WORK/budctl-$TARGET
157162 DESKTOP=$FILES/budctl.desktop
163+ ICON=$FILES/budctl.svg
158164 ;;
159165 esac
160166
@@ -170,9 +176,23 @@ sed "s|^Exec=budctl-gui|Exec=$BIN_DIR/budctl-gui|" "$DESKTOP" >"$WORK/budctl.des
170176 $SUDO install -d "$BIN_DIR" "$APP_DIR"
171177 $SUDO install -m 0755 "$FILES/budctl" "$FILES/budctl-gui" "$BIN_DIR/"
172178 $SUDO install -m 0644 "$WORK/budctl.desktop" "$APP_DIR/budctl.desktop"
179+# Releases from before the icon carry none; their launcher entry names a stock one instead.
180+ICON_INSTALLED=
181+if [ -f "$ICON" ]; then
182+ $SUDO install -d "$ICON_DIR"
183+ $SUDO install -m 0644 "$ICON" "$ICON_DIR/budctl.svg"
184+ # A theme with an icon cache only sees a new icon once the cache is rebuilt.
185+ if [ -f "$ICON_THEME/icon-theme.cache" ] && command -v gtk-update-icon-cache >/dev/null 2>&1; then
186+ $SUDO gtk-update-icon-cache -q -t "$ICON_THEME" || true
187+ fi
188+ ICON_INSTALLED=yes
189+fi
173190
174191 say "Installed $("$BIN_DIR/budctl" --version) to $BIN_DIR (budctl, budctl-gui)"
175192 say "Installed the launcher entry to $APP_DIR/budctl.desktop"
193+if [ -n "$ICON_INSTALLED" ]; then
194+ say "Installed the icon to $ICON_DIR/budctl.svg"
195+fi
176196 case ":$PATH:" in
177197 *":$BIN_DIR:"*) ;;
178198 *) say "Note: $BIN_DIR is not on your PATH. Add it to run budctl from a terminal." ;;