feat(notify): Windows toasts under talk's own identity, icon on Linux
The daemon (and talk test --toast) now register the AppUserModelID m3ta.talk under HKCU with display name and the installed icon, so toasts appear as "talk" with the icon instead of Windows PowerShell; the PowerShell identity stays as fallback until the registration has run once. The redundant "talk" title line is dropped under the own identity. notify.Setup bundles icon install, identity and the talk: protocol handler for both callers. Linux notifications carry the installed icon as app_icon. doctor names the active identity. Verified on the Windows 11 VM: registry key, icon file, toast with working Cancel button, exe icon; Linux via quickshell. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
2e77cf0a11
commit
2d9d2a86e9
10 files changed
+290
-48
No files matched your search
@@ -1,3 +1,5 @@
|
||||
<img src="assets/icon/talk.svg" alt="" width="96" align="right">
|
||||
|
||||
# talk
|
||||
|
||||
> **Status: WIP**, under active development. Specification with the decision
|
||||
@@ -106,13 +108,20 @@ announcement ends.
|
||||
- **Linux:** talk talks to the freedesktop notification service on the
|
||||
session bus directly (any daemon with the "actions" capability: mako,
|
||||
dunst, GNOME Shell, KDE, quickshell) and receives the click over D-Bus.
|
||||
Without a session bus it falls back to notify-send without a button.
|
||||
- **Windows:** a toast with a Cancel button. The button opens a `talk:`
|
||||
link; the daemon registers that URL protocol for the current user (HKCU,
|
||||
no admin rights) so Windows starts `talk uri talk:cancel?id=…`, which
|
||||
tells the daemon to stop the announcement. The toast appears under
|
||||
Windows PowerShell's identity for now.
|
||||
- **macOS:** Notification Center, no button yet.
|
||||
The notification carries the talk icon. Without a session bus it falls
|
||||
back to notify-send without a button.
|
||||
- **Windows:** a toast from "talk" with its icon and a Cancel button. The
|
||||
button opens a `talk:` link; the daemon registers that URL protocol for
|
||||
the current user (HKCU, no admin rights) so Windows starts
|
||||
`talk uri talk:cancel?id=…`, which tells the daemon to stop the
|
||||
announcement. The toast identity (`AppUserModelId m3ta.talk`, also HKCU)
|
||||
is registered the same way on the first daemon start or `talk test
|
||||
--toast`; before that the toast appears under Windows PowerShell's
|
||||
identity.
|
||||
- **macOS:** Notification Center, no button and no icon yet.
|
||||
|
||||
The icon file lives next to the config (`talk.png` in the config
|
||||
directory); talk writes it there itself.
|
||||
|
||||
Turn it off with:
|
||||
|
||||
@@ -439,6 +448,12 @@ nix develop # devShell with go, gopls, espeak-ng, libnotify
|
||||
CI: `.gitea/workflows/test.yml` (Gitea Actions) runs vet, the gofmt check,
|
||||
tests and build on every push and pull request.
|
||||
|
||||
**Icon:** the source is `assets/icon/talk.svg`. `go run assets/icon/gen.go`
|
||||
(needs inkscape) renders the embedded PNG (`internal/icon/talk.png`), the
|
||||
Windows `talk.ico` and the resource objects `cmd/talk/rsrc_windows_*.syso`
|
||||
that give `talk.exe` its icon; all of them are committed, so a normal build
|
||||
needs no resource compiler.
|
||||
|
||||
**Release:** push a `v*` tag → `.gitea/workflows/release.yml` tests, builds
|
||||
the six targets with `scripts/release.sh` (static, `CGO_ENABLED=0`, version
|
||||
via ldflags) and creates a Gitea release with `talk_<os>_<arch>[.exe]` and
|
||||
|
||||
Reference in new issue
Block a user