Notification: Rework priority and position of sender, summary, and body #27

Closed
earboxer wants to merge 0 commits from earboxer/itd:notif-sender-summary into master
Contributor

Specifically, put the summary in the sender position when sender is blank

I've been using this with SXMO, but found it annoying how the notification title would always say "notify-send" or "dunstify". With a small tweak there, I can set the summary to the person who sent me a text, and set the appname to "".

I also removed a newline so you can see more.

Specifically, put the summary in the sender position when sender is blank I've been using this with SXMO, but found it annoying how the notification title would always say "notify-send" or "dunstify". With a small tweak there, I can set the summary to the person who sent me a text, and set the appname to "". I also removed a newline so you can see more.
earboxer added 1 commit 2022-09-23 04:12:42 +00:00
Specifically, put the summary in the sender position when sender is blank
Owner

The issue is that the sender field is never blank. It contains the program that sent the notification. When you see notify-send in there, that means notify-send is what created the notification.

The issue is that the sender field is never blank. It contains the program that sent the notification. When you see `notify-send` in there, that means `notify-send` is what created the notification.
Owner

You should be receiving emails from my instance now. I am sending this so you see the comment I made before.

You should be receiving emails from my instance now. I am sending this so you see the comment I made before.
Author
Contributor

My goal is to save space on the watch by not printing worthless information. When I get a message from someone, I just want to see the person's name (which is sent in the summary), rather than the app's name.

As an example, in a proposed patch I have toward SXMO, I'm explicitly setting the appname to the empty string. The maintainer there suggested to set the app name to something specific, like notification_monitor.

Maybe the best solution would be to add a config value for values which needn't be shown:

[notifs.blankout]
    sender = ["Dino", "notification_monitor"]

Which would cause notifications from Dino and notification_monitor to show the summary and hide the app name.

My goal is to save space on the watch by not printing worthless information. When I get a message from someone, I just want to see the person's name (which is sent in the summary), rather than the app's name. As an example, in a [proposed patch I have toward SXMO](https://lists.sr.ht/~mil/sxmo-devel/patches/35517), I'm explicitly setting the appname to the empty string. The maintainer there suggested to set the app name to something specific, like notification_monitor. Maybe the best solution would be to add a config value for values which needn't be shown: ```toml [notifs.blankout] sender = ["Dino", "notification_monitor"] ``` Which would cause notifications from Dino and notification_monitor to show the summary and hide the app name.
Owner

An even simpler way would be to just have a config setting that switches the behavior to always send the summary as the title instead of the sender. Would that be good enough? I'd like to avoid added complexity if possible.

An even simpler way would be to just have a config setting that switches the behavior to always send the summary as the title instead of the sender. Would that be good enough? I'd like to avoid added complexity if possible.
Author
Contributor

I wonder if we would need a switch. I might try it out with always sending summary as title when it exists.

For "app name", it seems it could be sufficient to map different apps into different categories:

https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/doc/ble.md#notifications

  • xmpp,irc,matrix apps mapped to "Instant Message" 0x09
  • email mapped to "Email" 0x01
  • SMS/MMS as "SMS/MMS" 0x05
I wonder if we would need a switch. I might try it out with always sending summary as title when it exists. For "app name", it seems it could be sufficient to map different apps into different categories: https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/doc/ble.md#notifications * xmpp,irc,matrix apps mapped to "Instant Message" 0x09 * email mapped to "Email" 0x01 * SMS/MMS as "SMS/MMS" 0x05
Owner

I wrote those InfiniTime docs. The issue is that InfiniTime currently doesn't do anything with the notification categories. The user has no way of knowing which category was used. Also, I'd have to maintain a list of programs mapping them to their categories, which would be extremely difficult to maintain.

I wrote those InfiniTime docs. The issue is that InfiniTime currently doesn't do anything with the notification categories. The user has no way of knowing which category was used. Also, I'd have to maintain a list of programs mapping them to their categories, which would be extremely difficult to maintain.
Author
Contributor

There's really not that many linux (mobile) apps, and I'm sure others would help contribute if their favorites are missing (though that does seem out of scope for this project, maybe that could be a config value which distros might maintain, or from the notification's "category"), but yeah if InfiniTime isn't using it, not much reason to go through any effort.

There's really not that many [linux](https://linuxphoneapps.org/categories/email/) ([mobile](https://linuxphoneapps.org/categories/sms/)) [apps](https://linuxphoneapps.org/categories/chat/), and I'm sure others would help contribute if their favorites are missing (though that does seem out of scope for this project, maybe *that* could be a config value which distros might maintain, or from the notification's "category"), but yeah if InfiniTime isn't using it, not much reason to go through any effort.
Elara6331 closed this pull request 2022-10-23 08:15:41 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.