From f57ea7078455496db749ad6ce501f1c86da9d278 Mon Sep 17 00:00:00 2001 From: Brixy <1643010+Brixy@users.noreply.github.com> Date: Sat, 27 Apr 2024 13:39:55 +0200 Subject: [PATCH] feat: Add rules to [filetype] 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. --- yazi-config/preset/theme.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/yazi-config/preset/theme.toml b/yazi-config/preset/theme.toml index 2cc7a8b1..d7c3efd9 100644 --- a/yazi-config/preset/theme.toml +++ b/yazi-config/preset/theme.toml @@ -182,6 +182,15 @@ rules = [ # Documents { mime = "application/{pdf,doc,rtf,vnd.*}", fg = "green" }, + # Empty files + { mime = "inode/x-empty", fg = "red" }, + + # Is-rules + { name = "*" , is = "orphan", fg = "red" }, + { name = "*" , is = "link" , fg = "cyan" }, + { name = "*/", is = "link" , fg = "cyan" }, + { name = "*" , is = "exec" , fg = "green" }, + # Fallback # { name = "*", fg = "white" }, { name = "*/", fg = "blue" }