eza-community / eza-community/eza

feat: synchronizing icons with lf

Open
#593 2 comments 0 reactions 0 assignees View on GitHub
area: icons type: feature
Dominant language
Rust
Stars
23.3k
Forks
523
PR merge metrics
No merged PRs in 30d

Description

Hello! I've recently switched over from exa, and I'm looking for some way to get [lf](https://github.com/gokcehan/lf) and eza to share the same set of icons. In the past I used a [script I hacked together](https://github.com/mtoohey31/lf-exa-icons) to pull stuff from exa's source code, but that's not a very reliable approach, and I was wondering if you'd be interested in supporting something more reliable. I'd be happy to make the code changes myself.

lf requires icons to be provided in [this format](https://github.com/gokcehan/lf/blob/f52fffbff69e43720dcced5323ef5e95fefc0e56/etc/icons.example), which seems like it would be pretty easy to create from the [filename icons](https://github.com/eza-community/eza/blob/925a4ca155cfce5eeaa218db970331f073e7c956/src/output/icons.rs#L155) and [extension icons](https://github.com/eza-community/eza/blob/925a4ca155cfce5eeaa218db970331f073e7c956/src/output/icons.rs#L318) maps. These are two best approaches I've thought of so far:

1. Move that data into a toml file, then build it into the binary at compile time somehow (not sure on the details of how this would work, but there's gotta be a simple way to do this). Then the functionality of eza would remain unchanged, and we could provide a separate script to convert the toml to lf's icons format.
2. Have a flag in the eza binary for dumping the icons file to stdout out of the eza binary. I like this less than the previous option because it's specific to lf, whereas sticking things in toml would allow anyone to write similar scripts for other use-cases. It might be simpler to implement though, and could potentially be more convenient for users.

Let me know if either of those sound like something you'd want to support, or if you have another idea.

Contributor guide

Open the contributing guide

Research direction

Start by reading the filename and extension icon maps in src/output/icons.rs and comparing them with lf's etc/icons.example format. The issue presents two possible designs without choosing one, so first get agreement on the supported interface; done should provide a reliable way to share eza's icon data with lf.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.