How to display hidden files and hidden folders in different colors #2113
-
What system are you running Yazi on?Windows What terminal are you running Yazi in?Windows Powershell
|
Beta Was this translation helpful? Give feedback.
Answered by
hankertrix
Dec 30, 2024
Replies: 2 comments 2 replies
-
In your Add a rule like [filetype]
rules = [
# Images
{ mime = "image/*", fg = "yellow" },
# Media
{ mime = "{audio,video}/*", fg = "magenta" },
# Archives
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "red" },
# Documents
{ mime = "application/{pdf,doc,rtf}", fg = "cyan" },
# Empty files
# { mime = "inode/empty", fg = "red" },
#############################################
# Add the 2 lines below
# Hidden files
{ name = "*", is = "hidden", bg = "cyan" },
#############################################
# Special files
{ name = "*", is = "orphan", bg = "red" },
{ name = "*", is = "exec", fg = "green" },
# Dummy files
{ name = "*", is = "dummy", bg = "red" },
{ name = "*/", is = "dummy", bg = "red" },
# Fallback
# { name = "*", fg = "white" },
{ name = "*/", fg = "blue" },
] Please also read this page: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Xiaomony
-
Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In your
theme.toml
file, copy Yazi's default file type configuration from here.Add a rule like
{ name = "*", is = "hidden", bg = "cyan"}
to the top of rules. Here's an example: