project-switch v0.19
Real logo icons, and macOS parity for the webview and webserver
The visible change today was getting rid of the hand-drawn “PS” square I’d been using as an icon. The tray and menu-bar icon now decode a bundled logo-tray.png (same artwork on both platforms), and I pulled all the icon handling into a shared src/icon.rs so the launcher window, the webview window, and the tray all draw from one place. On macOS the dock gets a squircle-masked variant of the full logo.png: the logo is inset on a transparent canvas at Apple’s icon grid ratio (~80.5% of the tile) with its corners rounded into the system squircle, premultiplied so the corner feathering reads correctly through AppKit’s bitmap initializer. The result sits at the same scale and shape as native dock icons instead of looking like a bare executable.
Two follow-on fixes gave the windows their icons too: neither egui’s launcher window nor tao’s webview window adopts the exe’s embedded icon on its own, so the Windows taskbar was showing the default executable mark. Both now set the app logo explicitly via with_icon / with_window_icon.
The larger piece of work was bringing macOS up to parity with Windows. The tray-managed assist webserver is now cross-platform: I collapsed the old Windows-only implementation and the macOS no-op stubs into a single hotkey/src/webserver.rs, with only the command construction varying by platform — Windows runs it inside WSL via wsl.exe -- bash -lc, while macOS runs it natively through the user’s login shell ($SHELL -lc), since there’s no WSL to go through. Logs land in ~/Library/Logs/project-switch on macOS and %LOCALAPPDATA% on Windows. The webview window got the same treatment, so the borderless in-app browser works on macOS as well.
One macOS build gotcha worth recording: the cross-compiled (zigbuild) binaries carry a linker ad-hoc signature that the OS code-signing monitor rejects at launch with a SIGKILL, so build.sh now re-signs both binaries ad-hoc with the native codesign before restarting the hotkey service.