Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more rules to [filetype] and [icon] #966

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

Brixy
Copy link
Contributor

@Brixy Brixy commented Apr 27, 2024

This adds rules for empty files, links and executables.

Coloring is based on eza's default theme. This also seems to be a default across terminal file managers.

This adds rules for empty files, links and executables.

Coloring is based on [eza's default theme](https://github.com/eza-community/eza/blob/main/src/theme/default_theme.rs). This also seems to be a default across  terminal file managers.
@Brixy
Copy link
Contributor Author

Brixy commented Apr 27, 2024

Closes #963

@Brixy
Copy link
Contributor Author

Brixy commented Apr 28, 2024

OK. Changed.

  • Cyan is used for links which is common.
  • Red is just used once for empty files.
  • Images and audios/videos use the same color, but audio and video filetypes are boldened. (This is approximately what eza does, yet with purple instead of yazi’s yellow.)

I also tested underlining links, but it was confusing as underlining is used in the preview windows.

@sxyazi
Copy link
Owner

sxyazi commented Apr 30, 2024

Thanks, I made some adjustments:

  • Removed the bold/crossed attribute and used different colors for distinction, as I found it wasn't very clear and overlapped with other bold text, such as emphasizing search keywords
  • Removed empty files but kept it there as an example, and I will also add them to the document
  • Used a background color for orphan instead of a foreground color, because the red foreground color is used for archived files
  • Removed link since there weren't enough colors, but I think having the filename to the right of the link to the linked file with "->" is distinctive enough, and I added a separate icon for it in the icon rules
  • Added icons for special files.

@sxyazi sxyazi changed the title feat: Add rules to [filetype] feat: add more rules to [filetype] and [icon] Apr 30, 2024
@sxyazi sxyazi merged commit bdb28f7 into sxyazi:main Apr 30, 2024
5 checks passed
@Brixy
Copy link
Contributor Author

Brixy commented Apr 30, 2024

Excellent! Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants