phuhl / linux_notification_center

A notification daemon/center for linux
BSD 3-Clause "New" or "Revised" License
997 stars 39 forks source link

[Feature request] newFirst for notification popups? #35

Open SergeyKasmy opened 4 years ago

SergeyKasmy commented 4 years ago

The notification center itself is already able to show the newest notifications on the top, top to bottom. It would be awesome if the popups themselves also had a similar setting, so that the oldest popups where at the bottom and disappeared first, i.e. bottom to top

Example from Plasma

MyriaCore commented 4 years ago

Did a bit of recon to figure out a bit about how things are done currently.

Screen offsets for new notifications are calculated here. The vertical position is calculated here, by adding up the heights of the notifications that are currently being displayed, which is why new notifications appear at the bottom of the stack. This sum is used here to set the position of the new notification, and also here, to be stored and used to sum up for the next notification that appears.

MyriaCore commented 4 years ago

To implement newFirst for popups, there are a few changes we'd have to make, but they all fall into two categories: Insertion and deletion:

On Insertion:

On Deletion: