philj56 / tofi

Tiny dynamic menu for Wayland
MIT License
891 stars 37 forks source link

Feature: Template to configure drun .desktop contents to display #133

Open muchgitsuchwow opened 12 months ago

muchgitsuchwow commented 12 months ago

Hey there. I'm currently using rofi (lbonn wayland fork) and like to switch to tofi. There is one thing I do which will not work well for me with tofi. I have several .desktop files that all run "Firefox". I can distinguish them with rofi based on "GenericName" attribute from desktop specification. rofi shows this as (e.g.) Firefox (bwrap), or Firefox (work), Firefox (customer), ...

In hope that this is an easy thing to do, I'd love to have some configuration variable how to display contents from a .desktop file in drun mode. Something like e.g. (!) drun_display = "{{.Name}} (<i>{{.GenericName}}</i>)"

muchgitsuchwow commented 12 months ago

Hm. Clever people would just update their .desktop files to include this in the Name attribute. Anyway, I'll keep this open. Perhaps this makes sense for other people in other regards. If in doubt feel free to close this one.

philj56 commented 11 months ago

Hey, yeah I'm not so sure about this. In principle I agree with it, but making the format customisable with things like markup is probably not going to happen anytime soon (if at all). It might be doable though, I'll have to think about it some more when I get the time.

If I did add this soon, it'd probably just be in the form --drun-display=<name|generic_name|comment>, or something like that. I think this is still a fairly niche use-case, though.

Thanks for the suggestion!