Repository navigation
desktop: set the notification application name from --title - #233
Merged
Merged
Conversation
Signed-off-by: Ryo Kusnadi <ryokusnadi@gmail.com>
nlewo
approved these changes
Nov 21, 2026
Owner
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #229
Problem
comin desktopnotifications show the app name "DefaultAppName" in the desktop environment instead of something meaningful.How it happens: run
comin desktop(or thecomin-desktopuser service from the NixOS module) and wait for any notification. The notification daemon shows the app name next to the title.Expected: app name is the
--titlevalue (default "comin").Actual: "DefaultAppName".
Cause
cmd/desktop.gonever setsbeeep.AppName. The beeep library (v0.11.2) defaults it to "DefaultAppName" and sends that as the app name over DBus.Fix
New small helper
setAppNamethat setsbeeep.AppName.Runcalls it with the--titlevalue before the startup notification.handler()needs nothing extra because it runs after that, andbeeep.AppNameis a package global. Notification title and body are unchanged.Scope
beeep.Notifyis only called incmd/desktop.go(startup andhandler), so nothing else is affected. The--titleflag and the Nix module option stay as they are. I did not touch the existing gofmt differences in that file.Testing
New
TestSetAppNameincmd/desktop_test.go:foogivesfoo, the flag default givescomin.Before the fix it didn't build, since
setAppNamedidn't exist:After:
ok github.com/nlewo/comin/cmd.Ran:
go vet ./cmd/,go test -race -count=1 ./cmd/. Not run: the full suite, the NixOS module, or a real notification daemon (the test checks the value, not what the desktop shows).Environment: main @ c847682, go1.27.4, darwin/arm64
Risk
Low. Only the app name label changes.