regolith-rofication icon indicating copy to clipboard operation
regolith-rofication copied to clipboard

Display oldest notifications first by default

Open dferrand opened this issue 3 years ago • 8 comments

In response to https://github.com/regolith-linux/regolith-desktop/issues/607 I changed rofication-daemon to reverse notification list order (to display the newest notification first) by default.

Previous behaviour (oldest notification first) can be restored by setting i3xrocks.oldest.first to true in Xresources.

dferrand avatar Nov 24 '21 23:11 dferrand

I made the notification sort more flexible, it is now possible to sort notification on multiple fields.

Sort order is indicated in i3xrocks.notify.sort.by as a space separated list of fields. If a field name is preceded by ! it is considered a descending sort order. Default sort order is "!timestamp". Previous order can now restored by setting sort order to "timestamp".

Another useful sort order could be "!urgency !timestamp" to have notifications sorted by urgency (more urgent first) then by timestamp (newest first).

dferrand avatar Nov 25 '21 19:11 dferrand

I made the notification sort more flexible, it is now possible to sort notification on multiple fields.

LGTM but this should be documented somewhere other than here :-) [suggestion: Website + config template]

cfsmp3 avatar Nov 25 '21 19:11 cfsmp3

LGTM but this should be documented somewhere other than here :-) [suggestion: Website + config template]

Good point, I created https://github.com/regolith-linux/website/pull/160 for website documentation.

I'm not sure what a config template is.

dferrand avatar Nov 26 '21 17:11 dferrand

I'm not sure what a config template is.

https://github.com/regolith-linux/regolith-i3-gaps-config/blob/master/config

I think have the default there listed explicitly is a good idea. BTW I think Xresources is going away (it was removed from the newest i3). I could be wrong though @kgilmer

cfsmp3 avatar Nov 26 '21 18:11 cfsmp3

https://github.com/regolith-linux/regolith-i3-gaps-config/blob/master/config

This is the i3 config file, I do not change anything there, only Xresources.

dferrand avatar Nov 27 '21 15:11 dferrand

https://github.com/regolith-linux/regolith-i3-gaps-config/blob/master/config

This is the i3 config file, I do not change anything there, only Xresources.

I know; I suggest that you do actually modify that file so that it contains the default for the new setting.

cfsmp3 avatar Nov 27 '21 15:11 cfsmp3

r

Thank you @dferrand , very nice PR. Can you explain a bit about how you tested this change? How will users know what values they can provide for the sort field?

I tested manually on my system by killing the "normal" regolith-rofication process and launching the dev one instead.

Technically you can sort on any field of the Notification class (defined in rofication/_notification.py) but I don't see much practical use to sort on anything but timestamp and urgency. How would you suggest to let the user know the possible fields?

dferrand avatar Nov 30 '21 22:11 dferrand

Sorry for the delay.

How would you suggest to let the user know the possible fields?

We'll just need to document it on the website. This is the page and this is the markdown file that can include the details

kgilmer avatar Dec 04 '21 20:12 kgilmer