diff --git a/tray/generate_icons.py b/tray/generate_icons.py index 9b66dcf..6db2c22 100644 --- a/tray/generate_icons.py +++ b/tray/generate_icons.py @@ -1,34 +1,54 @@ -#!/usr/bin/env python3 -"""Generate VPN shield icons in different colors.""" - -import cairosvg -from pathlib import Path - -COLORS = { - "green": "#00FF88", - "red": "#FF3C3C", - "yellow": "#FFC800", -} - -TEMPLATE = ''' - - -''' - -icons_dir = Path(__file__).parent / "icons" - -for name, color in COLORS.items(): - svg_content = TEMPLATE.format(color=color) - - # Generate 18pt and 18pt@2x versions - for size, suffix in [(18, ""), (36, "@2x")]: - output_path = icons_dir / f"vpn-{name}-18{suffix}.png" - cairosvg.svg2png( - bytestring=svg_content.encode(), - write_to=str(output_path), - output_width=size, - output_height=size, - ) - print(f"Generated: {output_path.name}") - -print("Done!") +#!/usr/bin/env python3 +"""Generate the net-tools menu-bar icons: a hub-and-spoke mesh glyph. + +The glyph mirrors the actual wg1 topology — one hub (yuzu) linked to three +nodes, with faint node-to-node arcs so it reads as a mesh rather than a star. +Color encodes tunnel state (green = up, yellow = connecting, red = down), +the scheme the tray has always used. Output names are fixed API for +tray/vpn_tray.py. +""" + +from pathlib import Path + +import cairosvg + +COLORS = { + "green": "#00FF88", + "red": "#FF3C3C", + "yellow": "#FFC800", +} + +TEMPLATE = """ + + + + + + + + + + + + + + + + +""" + +icons_dir = Path(__file__).parent / "icons" + +for name, color in COLORS.items(): + svg = TEMPLATE.format(color=color) + for size, suffix in [(18, ""), (36, "@2x")]: + out = icons_dir / f"vpn-{name}-18{suffix}.png" + cairosvg.svg2png( + bytestring=svg.encode(), + write_to=str(out), + output_width=size, + output_height=size, + ) + print(f"Generated: {out.name}") + +print("Done!") diff --git a/tray/icons/green-16.png b/tray/icons/green-16.png deleted file mode 100644 index 37195dd..0000000 Binary files a/tray/icons/green-16.png and /dev/null differ diff --git a/tray/icons/green-16@2x.png b/tray/icons/green-16@2x.png deleted file mode 100644 index 65881b9..0000000 Binary files a/tray/icons/green-16@2x.png and /dev/null differ diff --git a/tray/icons/green-18.png b/tray/icons/green-18.png deleted file mode 100644 index 10008e2..0000000 Binary files a/tray/icons/green-18.png and /dev/null differ diff --git a/tray/icons/green-18@2x.png b/tray/icons/green-18@2x.png deleted file mode 100644 index 5c6dcf3..0000000 Binary files a/tray/icons/green-18@2x.png and /dev/null differ diff --git a/tray/icons/green-24.png b/tray/icons/green-24.png deleted file mode 100644 index 374e3fd..0000000 Binary files a/tray/icons/green-24.png and /dev/null differ diff --git a/tray/icons/green-24@2x.png b/tray/icons/green-24@2x.png deleted file mode 100644 index ec9b6da..0000000 Binary files a/tray/icons/green-24@2x.png and /dev/null differ diff --git a/tray/icons/green-32.png b/tray/icons/green-32.png deleted file mode 100644 index 65881b9..0000000 Binary files a/tray/icons/green-32.png and /dev/null differ diff --git a/tray/icons/green-32@2x.png b/tray/icons/green-32@2x.png deleted file mode 100644 index 9c180ad..0000000 Binary files a/tray/icons/green-32@2x.png and /dev/null differ diff --git a/tray/icons/green-48.png b/tray/icons/green-48.png deleted file mode 100644 index ec9b6da..0000000 Binary files a/tray/icons/green-48.png and /dev/null differ diff --git a/tray/icons/green-48@2x.png b/tray/icons/green-48@2x.png deleted file mode 100644 index 918554c..0000000 Binary files a/tray/icons/green-48@2x.png and /dev/null differ diff --git a/tray/icons/red-16.png b/tray/icons/red-16.png deleted file mode 100644 index 826923b..0000000 Binary files a/tray/icons/red-16.png and /dev/null differ diff --git a/tray/icons/red-16@2x.png b/tray/icons/red-16@2x.png deleted file mode 100644 index ea3d8e9..0000000 Binary files a/tray/icons/red-16@2x.png and /dev/null differ diff --git a/tray/icons/red-18.png b/tray/icons/red-18.png deleted file mode 100644 index e52a80a..0000000 Binary files a/tray/icons/red-18.png and /dev/null differ diff --git a/tray/icons/red-18@2x.png b/tray/icons/red-18@2x.png deleted file mode 100644 index e955a44..0000000 Binary files a/tray/icons/red-18@2x.png and /dev/null differ diff --git a/tray/icons/red-24.png b/tray/icons/red-24.png deleted file mode 100644 index efa3875..0000000 Binary files a/tray/icons/red-24.png and /dev/null differ diff --git a/tray/icons/red-24@2x.png b/tray/icons/red-24@2x.png deleted file mode 100644 index cb3393e..0000000 Binary files a/tray/icons/red-24@2x.png and /dev/null differ diff --git a/tray/icons/red-32.png b/tray/icons/red-32.png deleted file mode 100644 index ea3d8e9..0000000 Binary files a/tray/icons/red-32.png and /dev/null differ diff --git a/tray/icons/red-32@2x.png b/tray/icons/red-32@2x.png deleted file mode 100644 index 31dd57c..0000000 Binary files a/tray/icons/red-32@2x.png and /dev/null differ diff --git a/tray/icons/red-48.png b/tray/icons/red-48.png deleted file mode 100644 index cb3393e..0000000 Binary files a/tray/icons/red-48.png and /dev/null differ diff --git a/tray/icons/red-48@2x.png b/tray/icons/red-48@2x.png deleted file mode 100644 index effd924..0000000 Binary files a/tray/icons/red-48@2x.png and /dev/null differ diff --git a/tray/icons/vpn-green-18.png b/tray/icons/vpn-green-18.png index bfbb6f9..b0649a6 100644 Binary files a/tray/icons/vpn-green-18.png and b/tray/icons/vpn-green-18.png differ diff --git a/tray/icons/vpn-green-18@2x.png b/tray/icons/vpn-green-18@2x.png index fa4c5ca..53bd00a 100644 Binary files a/tray/icons/vpn-green-18@2x.png and b/tray/icons/vpn-green-18@2x.png differ diff --git a/tray/icons/vpn-red-18.png b/tray/icons/vpn-red-18.png index 5b71af8..bbc471c 100644 Binary files a/tray/icons/vpn-red-18.png and b/tray/icons/vpn-red-18.png differ diff --git a/tray/icons/vpn-red-18@2x.png b/tray/icons/vpn-red-18@2x.png index ebd6e4e..c4c183c 100644 Binary files a/tray/icons/vpn-red-18@2x.png and b/tray/icons/vpn-red-18@2x.png differ diff --git a/tray/icons/vpn-shield.svg b/tray/icons/vpn-shield.svg deleted file mode 100644 index f5eb6fd..0000000 --- a/tray/icons/vpn-shield.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tray/icons/vpn-yellow-18.png b/tray/icons/vpn-yellow-18.png index f35f992..9d87d17 100644 Binary files a/tray/icons/vpn-yellow-18.png and b/tray/icons/vpn-yellow-18.png differ diff --git a/tray/icons/vpn-yellow-18@2x.png b/tray/icons/vpn-yellow-18@2x.png index 48a5bcd..0c5454c 100644 Binary files a/tray/icons/vpn-yellow-18@2x.png and b/tray/icons/vpn-yellow-18@2x.png differ diff --git a/tray/icons/yellow-16.png b/tray/icons/yellow-16.png deleted file mode 100644 index dfaf427..0000000 Binary files a/tray/icons/yellow-16.png and /dev/null differ diff --git a/tray/icons/yellow-16@2x.png b/tray/icons/yellow-16@2x.png deleted file mode 100644 index 4f5a105..0000000 Binary files a/tray/icons/yellow-16@2x.png and /dev/null differ diff --git a/tray/icons/yellow-18.png b/tray/icons/yellow-18.png deleted file mode 100644 index 65967a8..0000000 Binary files a/tray/icons/yellow-18.png and /dev/null differ diff --git a/tray/icons/yellow-18@2x.png b/tray/icons/yellow-18@2x.png deleted file mode 100644 index d0e16f7..0000000 Binary files a/tray/icons/yellow-18@2x.png and /dev/null differ diff --git a/tray/icons/yellow-24.png b/tray/icons/yellow-24.png deleted file mode 100644 index 6cda10f..0000000 Binary files a/tray/icons/yellow-24.png and /dev/null differ diff --git a/tray/icons/yellow-24@2x.png b/tray/icons/yellow-24@2x.png deleted file mode 100644 index 0cc1aeb..0000000 Binary files a/tray/icons/yellow-24@2x.png and /dev/null differ diff --git a/tray/icons/yellow-32.png b/tray/icons/yellow-32.png deleted file mode 100644 index 4f5a105..0000000 Binary files a/tray/icons/yellow-32.png and /dev/null differ diff --git a/tray/icons/yellow-32@2x.png b/tray/icons/yellow-32@2x.png deleted file mode 100644 index a098e5c..0000000 Binary files a/tray/icons/yellow-32@2x.png and /dev/null differ diff --git a/tray/icons/yellow-48.png b/tray/icons/yellow-48.png deleted file mode 100644 index 0cc1aeb..0000000 Binary files a/tray/icons/yellow-48.png and /dev/null differ diff --git a/tray/icons/yellow-48@2x.png b/tray/icons/yellow-48@2x.png deleted file mode 100644 index d624395..0000000 Binary files a/tray/icons/yellow-48@2x.png and /dev/null differ