Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Cawbird notifications should use app icon and show app name #378

Open
txtsd opened this issue May 2, 2021 · 3 comments
Open

Cawbird notifications should use app icon and show app name #378

txtsd opened this issue May 2, 2021 · 3 comments
Labels
design UI and design issues

Comments

@txtsd
Copy link

txtsd commented May 2, 2021

Describe the bug
When using the notification daemon dunst, Cawbird notifications show up with a generic notification icon instead of the app icon, and there is no app name in the notification.

To Reproduce
Steps to reproduce the behavior:

  1. Install dunst and run it
  2. Receive a notification from Cawbird
  3. See the generic icon and missing app name

Expected behavior
The icon should be Cawbird's icon, and the app's name should show in the notification

Screenshots
The app name usually appears before the colon in my config. Here it is empty.
2021-05-02-194224_1920x1080_scrot

System details:

  • OS: Arch Linux
  • Version: 1.4
  • Package type: Official Arch repos

Additional context

@IBBoard
Copy link
Owner

IBBoard commented May 2, 2021

We use GLib.Notification and GLib.Application.send_notification() for the notifications, which sends DBus messages and provides an ID etc.

As far as I can tell, there's no way to set an application name. It's just not part of the API. Gnome (and presumably some other desktop environments, based on what I've seen) pull the name and icon from the .desktop file.

We could set an icon for all of those DEs/notification systems that can't find it themselves. But it seems a bit wasteful and prone to other problems if we ship the icon with each message rather than letting the DE pick the appropriately scaled icon etc

Edit: Just used dbus-monitor to pick out this message:

method call time=1619968762.925961 sender=:1.803 -> destination=org.gtk.Notifications serial=135 path=/org/gtk/Notifications; interface=org.gtk.Notifications; member=AddNotification
   string "uk.co.ibboard.cawbird"
   string "47304773-tweet-1388875395211137029"
   array [
      dict entry(
         string "title"
         variant             string ""Test & Account" with a long name tweeted"
      )
      dict entry(
         string "body"
         variant             string "D'oh. We hide our own mentions."
      )
      dict entry(
         string "priority"
         variant             string "normal"
      )
      dict entry(
         string "default-action"
         variant             string "app.show-window"
      )
      dict entry(
         string "default-action-target"
         variant             int64 47304773
      )
   ]

I'll look at it more later and map it to the spec.

@IBBoard IBBoard added the design UI and design issues label May 2, 2021
@txtsd
Copy link
Author

txtsd commented May 2, 2021

I managed to use Dunst to replace the icon with one I want. The app name, however, is up to you. It'll be nice to have Cawbird work well outside of a DE.

@IBBoard
Copy link
Owner

IBBoard commented May 6, 2021

It looks like it's a limitation of GLib's GNotification. We would need to swap to libnotify to pass an app name. But that would also enable us to do #277, so it will probably happen at some point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design UI and design issues
Projects
None yet
Development

No branches or pull requests

2 participants