IBBoard / cawbird

A fork of the Corebird GTK Twitter client that continues to work with Twitter
https://ibboard.co.uk/cawbird/
GNU General Public License v3.0
309 stars 37 forks source link

Notification sound #277

Open philipzae opened 3 years ago

philipzae commented 3 years ago

It would be nice to be able to hear a notification sound in addition to the notification popup that appears, as I have cawbird on my second monitor and sometimes I miss the notification popups.

IBBoard commented 3 years ago

I'd have to look in to how this works cross-platform. I don't want to be bundling custom WAV files or anything, so hopefully there's a way to say "play bell noise" (the same as you can with a terminal) and then let the desktop work out what that means (e.g. users who can't use sounds for some reason may make it flash the entire window).

philipzae commented 3 years ago

It should ideally play the 'bell' sound of the user's configured sound theme. You can use the libcanberra library, similar to other software do. On my system with the gnome-session-canberra package installed, i can run canberra-gtk-play -i bell and it works.

IBBoard commented 3 years ago

Okay, thanks for the pointer. We can probably work something out from there. But the Vala docs are… lacking.

IBBoard commented 3 years ago

I found an article that says we should also be able to send notification hints, which have various types including sound-name, which includes names like message-new-instant and window-attention-active (or inactive) (archived list)

However, we use Glib.Notification, which doesn't support hints. But I noticed that it is intentionally persistent, which has annoyed me before. So we could swap to libnotify and its hints.

The question then is, are we an IM or an email notification? Or just window attention?

Maybe window attention for timelines and IM for DMs?

philipzae commented 3 years ago

Maybe window attention for timelines and IM for DMs?

Sounds good to me, though mentions should also be IM.