Skip to content

Allow using { mime = } instead of {name = } to configure icon rules in theme.toml #872

@Souheab

Description

@Souheab

Please describe the problem you're trying to solve

Right now we have to provide name to apply icons to items like this { name = "*.ext", text = "i", fg = "#ffffff"}. I want to be able to do this via mime type instead of the name similar to how we would assign rules in the [filetype] section in theme.toml. So for example I would want something like this { mime = "application/x-executable", text = "e", fg = "#ffffff"} to be a valid configuration option

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

Ability to have something like this in theme.toml

[icon]
prepend_rules = [
{ mime = "application/x-executable", text = "e", fg = "#ffffff"}
]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions