Commit Graph
3 Commits
Author SHA1 Message Date
yetone 164e026d04 tray (Linux): after letting go of its well-known name, the tray registers again under the connection's own name, so noctalia keeps the icon (#2421)
dropTrayName releases org.kde.StatusNotifierItem-<pid>-1, which Wails
registered with the watcher by path. A watcher that keys an item by the
name it was registered under (noctalia) dropped magpie's icon when that
name went away. The tray now calls RegisterStatusNotifierItem with the
connection's unique name right after, which is what the reporter's
workaround does by hand.

Run: in the omarchy VM (Quickshell watcher), built with -tags gtk3 on
go1.26.8 and started `magpie tray` under a sandbox HOME on :3591.
RegisteredStatusNotifierItems listed its unique name (:1.236) once, no
org.kde.StatusNotifierItem-* name was left on the bus, introspecting
:1.236 /StatusNotifierItem answered, and the entry went when it exited.
Not tried: noctalia itself; asked the reporter to confirm.
gofmt clean; GOOS=linux go build/vet -tags nogui; darwin and windows vet.
Full suite: not run — one Linux-only file under internal/gui, which CI's
Linux job builds.
2026-10-16 00:16:43 +08:00
yetone 865ad6b03f gui: one magpie in Omarchy's tray, not two (songlairui on X: 为什么我的 omarchy 上会有两只喜鹊,一起来,一起退) — Wails' tray takes the name org.kde.StatusNotifierItem-<pid>-1 and registers with the watcher by its path, which Quickshell's watcher files under the connection's own name (:1.x); something on their system also registered the well-known name, and Quickshell tells items apart by how they were named, not by who owns them, so the one icon was two items (another app of theirs was doubled the same way). magpie now gives the name up once the tray has taken it: a registration by that name is refused, and one made already is dropped with it. In the Omarchy VM, registering the name before the change showed :1.328/StatusNotifierItem and org.kde.StatusNotifierItem-123846-1/StatusNotifierItem; after it, one item, the icon still in the bar. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build pass; built with -tags gtk3 on the VM. 2026-09-30 17:10:09 +08:00
yetone 4bd3f3a4b5 import: magpie://import links add a provider after the user confirms
A vendor or relay can hand out a ready-made provider as a link. The app
registers the magpie scheme (Info.plist on macOS, HKCU on Windows, a
.desktop handler on Linux), a second launch hands the link to the running
one, and the window shows what the link would add, with the hosts the
prompts and key would go to, before anything is saved. `magpie import`
does the same in a terminal.
2026-09-24 12:17:45 +08:00