NetBird sends its tray icon as a pixmap, so an icon theme can't replace it. patch.py rewrites the 48x48 PNGs embedded in netbird-ui in place: the glyph is scaled to 80% to get Breeze's padding and the white variants take the panel text color (#dedede). A pacman hook re-patches the binary after every netbird-ui upgrade, and restore.sh puts the original back.
16 lines
716 B
Bash
Executable File
16 lines
716 B
Bash
Executable File
#!/bin/bash
|
|
# Install the netbird-ui tray icon patch and its pacman hook. Usage: sudo ./install.sh
|
|
set -euo pipefail
|
|
here=$(cd "$(dirname "$0")" && pwd)
|
|
ROOT=${ROOT:-} # for dry-run testing only
|
|
[[ $EUID -eq 0 || -n $ROOT ]] || { echo "Must be run with sudo"; exit 1; }
|
|
dest=$ROOT/usr/local/share/netbird-breeze-icons
|
|
|
|
install -Dm755 "$here/patch.py" "$dest/patch.py"
|
|
install -m755 "$here/apply.sh" "$dest/apply.sh"
|
|
install -Dm644 "$here/netbird-breeze-icons.hook" "$ROOT/etc/pacman.d/hooks/netbird-breeze-icons.hook"
|
|
ROOT=$ROOT "$dest/apply.sh"
|
|
|
|
echo "Done. Restart the NetBird UI (without sudo):"
|
|
echo " pkill -x netbird-ui; setsid -f netbird-ui --daemon-addr unix:///var/run/netbird/main.sock >/dev/null 2>&1"
|