feat(tray-icons): shrink and recolor the NetBird tray icons
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.
This commit is contained in:
1 parent
fa77bc2514
commit
8425ceb709
7 files changed
+263
-3
No files matched your search
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Put the original netbird-ui back and remove the hook. Usage: sudo ./restore.sh
|
||||
set -euo pipefail
|
||||
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
|
||||
[[ -f $dest/orig/netbird-ui ]] || { echo "No original binary in $dest/orig"; exit 1; }
|
||||
install -m755 "$dest/orig/netbird-ui" "$ROOT/usr/bin/netbird-ui"
|
||||
rm -f "$ROOT/etc/pacman.d/hooks/netbird-breeze-icons.hook"
|
||||
rm -rf "$dest"
|
||||
echo "Restored. 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"
|
||||
Reference in new issue
Block a user