Dunst: Add option to always sort messages chronologically based on when they arrived?

Created on 22 Feb 2017  ·  5Comments  ·  Source: dunst-project/dunst

When manually recalling messages from history using the configured shortcut, the recalled message is added at the same position as actual new messages. It would be nice to have the option for manually recalled messages to be displayed where they would have originally appeared.

E.g., when recalling the latest message that isn't shown anymore, it should usually be older than all currently shown messages, so it could be added to the opposite side of the dunst window than new messages.

My use case is displaying notifications for chat messages. The current sorting options obfuscate the order in which manually recalled messages originally arrived.

Feature

Most helpful comment

Wait. is this issue all about making sort an enum and supporting sort = time !?

All 5 comments

I'm sorry. I assigned this issue to myself almost a year ago, but I only understood today, your actual intent.

I have to be honest, but I think your quest should be solved differently than described.

We don't keep track of any order between notifications themselves. The notifications are either unsorted and pushed to the end or via urgency/id and how it's actually made is up to the queue.

IMO the technique, which would fit perfect for your usecase would be the notification merging from NotifyOSD. But I don't think there's someone eager to implement this.

via urgency/id and how it's actually made is up to the queue.

Unless I am misunderstanding the issue what's being requested is a strictly chronological sort, which I believe we can do. We already have the option to sort by urgency and store the arrival time in the timestamp field anyway. Adding an option to change the comparison from priority to the timestamp should be doable (albeit with some refactoring).

Unless I am misunderstanding the issue what's being requested is a strictly chronological sort

Yeah, that's what I meant.

The queues aren't sorted by timestamp at any point. It's just that while you have sort = no or notifications with the same urgency, the insertion order of notifications is the same as if the queues would have been sorted by timestamps.

But at the point, when moving notifications back from history into displayed, this isn't the case anymore.

To sort the notifications by timestamp while redisplaying them vs sorting notification based on their urgency, this makes no sense and just introduces new bugs.

Wait. is this issue all about making sort an enum and supporting sort = time !?

Was this page helpful?
0 / 5 - 0 ratings