minad / marginalia

:scroll: marginalia.el - Marginalia in the minibuffer
GNU General Public License v3.0
782 stars 27 forks source link

Use a more nuanced display of file age #93

Closed tecosaur closed 3 years ago

tecosaur commented 3 years ago

By introducing marginalia-file-age-function and related function/variables, the display of file age is now easily customised, and provided OOTB support for relative ages (e.g. 4 hours ago).

image

minad commented 3 years ago

Can we also get some coloring depending on age? Three levels maybe - today, this week and older?

tecosaur commented 3 years ago

Can we also get some coloring depending on age? Three levels maybe - today, this week and older?

This wouldn't be hard, it would just need ... more faces.

elken commented 3 years ago

Can we also get some coloring depending on age? Three levels maybe - today, this week and older?

This wouldn't be hard, it would just need ... more faces.

Could you not just darken/lighten the face against how old it is?

tecosaur commented 3 years ago

Could you not just darken/lighten the face against how old it is?

That would be colour blending, which minad has already said he doesn't want "Not a good idea".

minad commented 3 years ago

@elken

Could you not just darken/lighten the face against how old it is?

This will break themes with high accessibility standards like the modus themes by @protesilaos.

elken commented 3 years ago

@elken

Could you not just darken/lighten the face against how old it is?

This will break themes with high accessibility standards like the modus themes by @protesilaos.

Excellent point :)

tecosaur commented 3 years ago

On colours, I'm no sure what three could be inherited from. I could do success / warning / error but I'm not sure if that's a bit OTT.

protesilaos commented 3 years ago

On 2021-07-26, 09:26 -0700, Ellis Kenyő @.***> wrote:

@elken

Could you not just darken/lighten the face against how old it is?

This will break themes with high accessibility standards like the modus themes by @protesilaos.

Excellent point :)

Thanks for considering this case! Automatic face adjustments would indeed be problematic. If, however, you choose to implement this feature by using new faces, then all should be fine.

-- Protesilaos Stavrou https://protesilaos.com

minad commented 3 years ago

For now I merged in only the basic support, but no customization variables. We should figure out a more general mechanism which allows adjusting annotation fields. Adding a variable for every field which is funcalled just won't fly.