feat!: redesign icons (#1086)

This commit is contained in:
三咲雅 · Misaki Masa 2024-05-25 22:56:08 +08:00 committed by GitHub
parent 5f21998665
commit 061faea1c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 824 additions and 269 deletions

4
Cargo.lock generated
View File

@ -1402,9 +1402,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
[[package]]
name = "parking_lot"
version = "0.12.2"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb"
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
"parking_lot_core",

21
LICENSE-ICONS Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 nvim-tree
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1 +1 @@
{"words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp"," Überzug"," Überzug","Konsole","Alacritty","Überzug","pkgs","paru","unarchiver","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode","sxyazi","rsplit","ZELLIJ","bitflags","bitflags","USERPROFILE","Neovim","vergen","gitcl","Renderable","preloaders","prec","imagesize","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS"],"version":"0.2","language":"en","flagWords":[]}
{"words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp"," Überzug"," Überzug","Konsole","Alacritty","Überzug","pkgs","paru","unarchiver","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode","sxyazi","rsplit","ZELLIJ","bitflags","bitflags","USERPROFILE","Neovim","vergen","gitcl","Renderable","preloaders","prec","imagesize","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds"],"language":"en","version":"0.2","flagWords":[]}

View File

@ -0,0 +1,36 @@
local dark = require("icons-default")
local light = require("icons-light")
function rearrange(by)
local map = {}
local source = by == "exts" and "icons_by_file_extension" or "icons_by_filename"
for k, v in pairs(dark[source]) do
map[k] = map[k] or {}
map[k].icon = v.icon
map[k].fg_dark = v.color:lower()
end
for k, v in pairs(light[source]) do
map[k].fg_light = v.color:lower()
end
return map
end
function dump(map)
local list = {}
for k, v in pairs(map) do
list[#list + 1] = { name = k, text = v.icon, fg_dark = v.fg_dark, fg_light = v.fg_light }
end
table.sort(list, function(a, b) return a.name:lower() < b.name:lower() end)
for _, v in ipairs(list) do
-- stylua: ignore
print(string.format('\t{ name = "%s", text = "%s", fg_dark = "%s", fg_light = "%s" },', v.name, v.text, v.fg_dark, v.fg_light))
end
end
print("files = [")
dump(rearrange("files"))
print("]")
print("exts = [")
dump(rearrange("exts"))
print("]")

View File

@ -196,171 +196,586 @@ rules = [
[icon]
rules = [
# Programming
{ name = "*.c" , text = "", fg = "#599eff" },
{ name = "*.cpp" , text = "", fg = "#519aba" },
{ name = "*.class", text = "", fg = "#cc3e44" },
{ name = "*.cs" , text = "󰌛", fg = "#596706" },
{ name = "*.css" , text = "", fg = "#42a5f5" },
{ name = "*.elm" , text = "", fg = "#4391d2" },
{ name = "*.fish" , text = "", fg = "#4d5a5e" },
{ name = "*.go" , text = "", fg = "#519aba" },
{ name = "*.h" , text = "", fg = "#a074c4" },
{ name = "*.hpp" , text = "", fg = "#a074c4" },
{ name = "*.html" , text = "", fg = "#e44d26" },
{ name = "*.jar" , text = "", fg = "#cc3e44" },
{ name = "*.java" , text = "", fg = "#cc3e44" },
{ name = "*.js" , text = "", fg = "#F1F134" },
{ name = "*.jsx" , text = "", fg = "#20c2e3" },
{ name = "*.lua" , text = "", fg = "#51a0cf" },
{ name = "*.nix" , text = "", fg = "#7ebae4" },
{ name = "*.nu" , text = ">", fg = "#3aa675" },
{ name = "*.php" , text = "", fg = "#a074c4" },
{ name = "*.py" , text = "", fg = "#ffbc03" },
{ name = "*.rb" , text = "", fg = "#701516" },
{ name = "*.rs" , text = "", fg = "#dea584" },
{ name = "*.sbt" , text = "", fg = "#4d5a5e" },
{ name = "*.scala", text = "", fg = "#cc463e" },
{ name = "*.scss" , text = "", fg = "#f55385" },
{ name = "*.sh" , text = "", fg = "#4d5a5e" },
{ name = "*.swift", text = "", fg = "#e37933" },
{ name = "*.ts" , text = "", fg = "#519aba" },
{ name = "*.tsx" , text = "", fg = "#1354bf" },
{ name = "*.vim" , text = "", fg = "#019833" },
{ name = "*.vue" , text = "󰡄", fg = "#8dc149" },
# Text
{ name = "*.conf", text = "", fg = "#6d8086" },
{ name = "*.ini" , text = "", fg = "#6d8086" },
{ name = "*.json", text = "", fg = "#cbcb41" },
{ name = "*.kdl" , text = "", fg = "#6d8086" },
{ name = "*.md" , text = "", fg = "white" },
{ name = "*.toml", text = "", fg = "white" },
{ name = "*.txt" , text = "", fg = "#89e051" },
{ name = "*.yaml", text = "", fg = "#6d8086" },
{ name = "*.yml" , text = "", fg = "#6d8086" },
# Archives
{ name = "*.7z" , text = "" },
{ name = "*.bz2", text = "" },
{ name = "*.gz" , text = "" },
{ name = "*.rar", text = "" },
{ name = "*.tar", text = "" },
{ name = "*.xz" , text = "" },
{ name = "*.zip", text = "" },
# Images
{ name = "*.HEIC", text = "", fg = "#a074c4" },
{ name = "*.avif", text = "", fg = "#a074c4" },
{ name = "*.bmp" , text = "", fg = "#a074c4" },
{ name = "*.gif" , text = "", fg = "#a074c4" },
{ name = "*.ico" , text = "", fg = "#cbcb41" },
{ name = "*.jpeg", text = "", fg = "#a074c4" },
{ name = "*.jpg" , text = "", fg = "#a074c4" },
{ name = "*.png" , text = "", fg = "#a074c4" },
{ name = "*.svg" , text = "", fg = "#FFB13B" },
{ name = "*.webp", text = "", fg = "#a074c4" },
# Movies
{ name = "*.avi" , text = "", fg = "#FD971F" },
{ name = "*.mkv" , text = "", fg = "#FD971F" },
{ name = "*.mov" , text = "", fg = "#FD971F" },
{ name = "*.mp4" , text = "", fg = "#FD971F" },
{ name = "*.webm", text = "", fg = "#FD971F" },
# Audio
{ name = "*.aac" , text = "", fg = "#66D8EF" },
{ name = "*.flac", text = "", fg = "#66D8EF" },
{ name = "*.m4a" , text = "", fg = "#66D8EF" },
{ name = "*.mp3" , text = "", fg = "#66D8EF" },
{ name = "*.ogg" , text = "", fg = "#66D8EF" },
{ name = "*.opus", text = "", fg = "#66D8EF" },
{ name = "*.wav" , text = "", fg = "#66D8EF" },
# Documents
{ name = "*.csv" , text = "", fg = "#89e051" },
{ name = "*.doc" , text = "", fg = "#185abd" },
{ name = "*.doct", text = "", fg = "#185abd" },
{ name = "*.docx", text = "", fg = "#185abd" },
{ name = "*.dot" , text = "", fg = "#185abd" },
{ name = "*.ods" , text = "", fg = "#207245" },
{ name = "*.ots" , text = "", fg = "#207245" },
{ name = "*.pdf" , text = "", fg = "#b30b00" },
{ name = "*.pom" , text = "", fg = "#cc3e44" },
{ name = "*.pot" , text = "", fg = "#cb4a32" },
{ name = "*.potx", text = "", fg = "#cb4a32" },
{ name = "*.ppm" , text = "", fg = "#a074c4" },
{ name = "*.ppmx", text = "", fg = "#cb4a32" },
{ name = "*.pps" , text = "", fg = "#cb4a32" },
{ name = "*.ppsx", text = "", fg = "#cb4a32" },
{ name = "*.ppt" , text = "", fg = "#cb4a32" },
{ name = "*.pptx", text = "", fg = "#cb4a32" },
{ name = "*.xlc" , text = "", fg = "#207245" },
{ name = "*.xlm" , text = "", fg = "#207245" },
{ name = "*.xls" , text = "", fg = "#207245" },
{ name = "*.xlsm", text = "", fg = "#207245" },
{ name = "*.xlsx", text = "", fg = "#207245" },
{ name = "*.xlt" , text = "", fg = "#207245" },
# Fonts
{ name = "*.eot", text = "", fg = "#ececec" },
{ name = "*.[ot]tf", text = "", fg = "#ececec" },
{ name = "*.{woff,woff2}", text = "", fg = "#ececec" },
# Lockfiles
{ name = "*.lock", text = "", fg = "#bbbbbb" },
# Misc
{ name = "*.bin", text = "", fg = "#9F0500" },
{ name = "*.exe", text = "", fg = "#9F0500" },
{ name = "*.pkg", text = "", fg = "#9F0500" },
# Dotfiles
{ name = "*/.DS_Store" , text = "", fg = "#41535b" },
{ name = "*/.bash_profile" , text = "", fg = "#89e051" },
{ name = "*/.bashrc" , text = "", fg = "#89e051" },
{ name = "*/.gitattributes", text = "", fg = "#41535b" },
{ name = "*/.gitignore" , text = "", fg = "#41535b" },
{ name = "*/.gitmodules" , text = "", fg = "#41535b" },
{ name = "*/.vimrc" , text = "", fg = "#019833" },
{ name = "*/.zprofile" , text = "", fg = "#89e051" },
{ name = "*/.zshenv" , text = "", fg = "#89e051" },
{ name = "*/.zshrc" , text = "", fg = "#89e051" },
# Named files
{ name = "*/COPYING" , text = "󰿃", fg = "#cbcb41" },
{ name = "*/Containerfile", text = "󰡨", fg = "#458ee6" },
{ name = "*/Dockerfile" , text = "󰡨", fg = "#458ee6" },
{ name = "*/LICENSE" , text = "󰿃", fg = "#d0bf41" },
# Directories
{ name = "*/.config/" , text = "" },
{ name = "*/.git/" , text = "" },
{ name = "*/Desktop/" , text = "" },
{ name = "*/Development/", text = "" },
{ name = "*/Documents/" , text = "" },
{ name = "*/Downloads/" , text = "" },
{ name = "*/Library/" , text = "" },
{ name = "*/Movies/" , text = "" },
{ name = "*/Music/" , text = "" },
{ name = "*/Pictures/" , text = "" },
{ name = "*/Public/" , text = "" },
{ name = "*/Videos/" , text = "" },
globs = []
dirs = [
{ name = ".config", text = "" },
{ name = ".git", text = "" },
{ name = "Desktop", text = "" },
{ name = "Development", text = "" },
{ name = "Documents", text = "" },
{ name = "Downloads", text = "" },
{ name = "Library", text = "" },
{ name = "Movies", text = "" },
{ name = "Music", text = "" },
{ name = "Pictures", text = "" },
{ name = "Public", text = "" },
{ name = "Videos", text = "" },
]
files = [
{ name = ".babelrc", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = ".bash_profile", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = ".bashrc", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = ".dockerignore", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99" },
{ name = ".ds_store", text = "", fg_dark = "#41535b", fg_light = "#41535b" },
{ name = ".editorconfig", text = "", fg_dark = "#fff2f2", fg_light = "#333030" },
{ name = ".env", text = "", fg_dark = "#faf743", fg_light = "#32310d" },
{ name = ".eslintignore", text = "", fg_dark = "#4b32c3", fg_light = "#4b32c3" },
{ name = ".eslintrc", text = "", fg_dark = "#4b32c3", fg_light = "#4b32c3" },
{ name = ".gitattributes", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d" },
{ name = ".gitconfig", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d" },
{ name = ".gitignore", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d" },
{ name = ".gitlab-ci.yml", text = "", fg_dark = "#e24329", fg_light = "#aa321f" },
{ name = ".gitmodules", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d" },
{ name = ".gtkrc-2.0", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = ".gvimrc", text = "", fg_dark = "#019833", fg_light = "#017226" },
{ name = ".luaurc", text = "", fg_dark = "#00a2ff", fg_light = "#007abf" },
{ name = ".mailmap", text = "󰊢", fg_dark = "#41535b", fg_light = "#41535b" },
{ name = ".npmignore", text = "", fg_dark = "#e8274b", fg_light = "#ae1d38" },
{ name = ".npmrc", text = "", fg_dark = "#e8274b", fg_light = "#ae1d38" },
{ name = ".prettierrc", text = "", fg_dark = "#4285f4", fg_light = "#3264b7" },
{ name = ".settings.json", text = "", fg_dark = "#854cc7", fg_light = "#643995" },
{ name = ".SRCINFO", text = "󰣇", fg_dark = "#0f94d2", fg_light = "#0b6f9e" },
{ name = ".vimrc", text = "", fg_dark = "#019833", fg_light = "#017226" },
{ name = ".Xauthority", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12" },
{ name = ".xinitrc", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12" },
{ name = ".Xresources", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12" },
{ name = ".xsession", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12" },
{ name = ".zprofile", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = ".zshenv", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = ".zshrc", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "_gvimrc", text = "", fg_dark = "#019833", fg_light = "#017226" },
{ name = "_vimrc", text = "", fg_dark = "#019833", fg_light = "#017226" },
{ name = "avif", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "brewfile", text = "", fg_dark = "#701516", fg_light = "#701516" },
{ name = "bspwmrc", text = "", fg_dark = "#2f2f2f", fg_light = "#2f2f2f" },
{ name = "build", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "build.gradle", text = "", fg_dark = "#005f87", fg_light = "#005f87" },
{ name = "build.zig.zon", text = "", fg_dark = "#f69a1b", fg_light = "#7b4d0e" },
{ name = "cantorrc", text = "", fg_dark = "#1c99f3", fg_light = "#1573b6" },
{ name = "checkhealth", text = "󰓙", fg_dark = "#75b4fb", fg_light = "#3a5a7e" },
{ name = "cmakelists.txt", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "commit_editmsg", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d" },
{ name = "compose.yaml", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99" },
{ name = "compose.yml", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99" },
{ name = "config", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "containerfile", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99" },
{ name = "copying", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "copying.lesser", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "docker-compose.yaml", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99" },
{ name = "docker-compose.yml", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99" },
{ name = "dockerfile", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99" },
{ name = "ext_typoscript_setup.txt", text = "", fg_dark = "#ff8700", fg_light = "#aa5a00" },
{ name = "favicon.ico", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "fp-info-cache", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "fp-lib-table", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "FreeCAD.conf", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "gemfile$", text = "", fg_dark = "#701516", fg_light = "#701516" },
{ name = "gnumakefile", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "gradle-wrapper.properties", text = "", fg_dark = "#005f87", fg_light = "#005f87" },
{ name = "gradle.properties", text = "", fg_dark = "#005f87", fg_light = "#005f87" },
{ name = "gradlew", text = "", fg_dark = "#005f87", fg_light = "#005f87" },
{ name = "groovy", text = "", fg_dark = "#4a687c", fg_light = "#384e5d" },
{ name = "gruntfile.babel.js", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "gruntfile.coffee", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "gruntfile.js", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "gruntfile.ts", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "gtkrc", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "gulpfile.babel.js", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "gulpfile.coffee", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "gulpfile.js", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "gulpfile.ts", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "hyprland.conf", text = "", fg_dark = "#00aaae", fg_light = "#008082" },
{ name = "i3blocks.conf", text = "", fg_dark = "#e8ebee", fg_light = "#2e2f30" },
{ name = "i3status.conf", text = "", fg_dark = "#e8ebee", fg_light = "#2e2f30" },
{ name = "kalgebrarc", text = "", fg_dark = "#1c99f3", fg_light = "#1573b6" },
{ name = "kdeglobals", text = "", fg_dark = "#1c99f3", fg_light = "#1573b6" },
{ name = "kdenlive-layoutsrc", text = "", fg_dark = "#83b8f2", fg_light = "#425c79" },
{ name = "kdenliverc", text = "", fg_dark = "#83b8f2", fg_light = "#425c79" },
{ name = "kritadisplayrc", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7" },
{ name = "kritarc", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7" },
{ name = "license", text = "", fg_dark = "#d0bf41", fg_light = "#686020" },
{ name = "lxde-rc.xml", text = "", fg_dark = "#909090", fg_light = "#606060" },
{ name = "lxqt.conf", text = "", fg_dark = "#0192d3", fg_light = "#016e9e" },
{ name = "makefile", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "mix.lock", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "mpv.conf", text = "", fg_dark = "#3b1342", fg_light = "#3b1342" },
{ name = "node_modules", text = "", fg_dark = "#e8274b", fg_light = "#ae1d38" },
{ name = "package-lock.json", text = "", fg_dark = "#7a0d21", fg_light = "#7a0d21" },
{ name = "package.json", text = "", fg_dark = "#e8274b", fg_light = "#ae1d38" },
{ name = "PKGBUILD", text = "", fg_dark = "#0f94d2", fg_light = "#0b6f9e" },
{ name = "platformio.ini", text = "", fg_dark = "#f6822b", fg_light = "#a4571d" },
{ name = "pom.xml", text = "", fg_dark = "#7a0d21", fg_light = "#7a0d21" },
{ name = "procfile", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "PrusaSlicer.ini", text = "", fg_dark = "#ec6b23", fg_light = "#9d4717" },
{ name = "PrusaSlicerGcodeViewer.ini", text = "", fg_dark = "#ec6b23", fg_light = "#9d4717" },
{ name = "py.typed", text = "", fg_dark = "#ffbc03", fg_light = "#805e02" },
{ name = "QtProject.conf", text = "", fg_dark = "#40cd52", fg_light = "#2b8937" },
{ name = "R", text = "󰟔", fg_dark = "#2266ba", fg_light = "#1a4c8c" },
{ name = "r", text = "󰟔", fg_dark = "#2266ba", fg_light = "#1a4c8c" },
{ name = "rakefile", text = "", fg_dark = "#701516", fg_light = "#701516" },
{ name = "rmd", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "settings.gradle", text = "", fg_dark = "#005f87", fg_light = "#005f87" },
{ name = "svelte.config.js", text = "", fg_dark = "#ff3e00", fg_light = "#bf2e00" },
{ name = "sxhkdrc", text = "", fg_dark = "#2f2f2f", fg_light = "#2f2f2f" },
{ name = "sym-lib-table", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "tailwind.config.js", text = "󱏿", fg_dark = "#20c2e3", fg_light = "#158197" },
{ name = "tailwind.config.mjs", text = "󱏿", fg_dark = "#20c2e3", fg_light = "#158197" },
{ name = "tailwind.config.ts", text = "󱏿", fg_dark = "#20c2e3", fg_light = "#158197" },
{ name = "tmux.conf", text = "", fg_dark = "#14ba19", fg_light = "#0f8c13" },
{ name = "tmux.conf.local", text = "", fg_dark = "#14ba19", fg_light = "#0f8c13" },
{ name = "tsconfig.json", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "unlicense", text = "", fg_dark = "#d0bf41", fg_light = "#686020" },
{ name = "vagrantfile$", text = "", fg_dark = "#1563ff", fg_light = "#104abf" },
{ name = "vlcrc", text = "󰕼", fg_dark = "#ee7a00", fg_light = "#9f5100" },
{ name = "webpack", text = "󰜫", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "weston.ini", text = "", fg_dark = "#ffbb01", fg_light = "#805e00" },
{ name = "workspace", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "xmobarrc", text = "", fg_dark = "#fd4d5d", fg_light = "#a9333e" },
{ name = "xmobarrc.hs", text = "", fg_dark = "#fd4d5d", fg_light = "#a9333e" },
{ name = "xmonad.hs", text = "", fg_dark = "#fd4d5d", fg_light = "#a9333e" },
{ name = "xorg.conf", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12" },
{ name = "xsettingsd.conf", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12" },
]
exts = [
{ name = "3gp", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10" },
{ name = "3mf", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b" },
{ name = "7z", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "a", text = "", fg_dark = "#dcddd6", fg_light = "#494a47" },
{ name = "aac", text = "", fg_dark = "#00afff", fg_light = "#0075aa" },
{ name = "ai", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "aif", text = "", fg_dark = "#00afff", fg_light = "#0075aa" },
{ name = "aiff", text = "", fg_dark = "#00afff", fg_light = "#0075aa" },
{ name = "android", text = "", fg_dark = "#34a853", fg_light = "#277e3e" },
{ name = "ape", text = "", fg_dark = "#00afff", fg_light = "#0075aa" },
{ name = "apk", text = "", fg_dark = "#34a853", fg_light = "#277e3e" },
{ name = "app", text = "", fg_dark = "#9f0500", fg_light = "#9f0500" },
{ name = "applescript", text = "", fg_dark = "#6d8085", fg_light = "#526064" },
{ name = "asc", text = "󰦝", fg_dark = "#576d7f", fg_light = "#41525f" },
{ name = "ass", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a" },
{ name = "astro", text = "", fg_dark = "#e23f67", fg_light = "#aa2f4d" },
{ name = "awk", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446" },
{ name = "azcli", text = "", fg_dark = "#0078d4", fg_light = "#005a9f" },
{ name = "bak", text = "󰁯", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "bash", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "bat", text = "", fg_dark = "#c1f12e", fg_light = "#40500f" },
{ name = "bazel", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "bib", text = "󱉟", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "bicep", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "bicepparam", text = "", fg_dark = "#9f74b3", fg_light = "#6a4d77" },
{ name = "bin", text = "", fg_dark = "#9f0500", fg_light = "#9f0500" },
{ name = "blade.php", text = "", fg_dark = "#f05340", fg_light = "#a0372b" },
{ name = "blend", text = "󰂫", fg_dark = "#ea7600", fg_light = "#9c4f00" },
{ name = "blp", text = "󰺾", fg_dark = "#5796e2", fg_light = "#3a6497" },
{ name = "bmp", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "brep", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "bz", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "bz2", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "bz3", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "bzl", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "c", text = "", fg_dark = "#599eff", fg_light = "#3b69aa" },
{ name = "c++", text = "", fg_dark = "#f34b7d", fg_light = "#a23253" },
{ name = "cache", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "cast", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10" },
{ name = "cbl", text = "⚙", fg_dark = "#005ca5", fg_light = "#005ca5" },
{ name = "cc", text = "", fg_dark = "#f34b7d", fg_light = "#a23253" },
{ name = "ccm", text = "", fg_dark = "#f34b7d", fg_light = "#a23253" },
{ name = "cfg", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "cjs", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "clj", text = "", fg_dark = "#8dc149", fg_light = "#466024" },
{ name = "cljc", text = "", fg_dark = "#8dc149", fg_light = "#466024" },
{ name = "cljd", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "cljs", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "cmake", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "cob", text = "⚙", fg_dark = "#005ca5", fg_light = "#005ca5" },
{ name = "cobol", text = "⚙", fg_dark = "#005ca5", fg_light = "#005ca5" },
{ name = "coffee", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "conf", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "config.ru", text = "", fg_dark = "#701516", fg_light = "#701516" },
{ name = "cp", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "cpp", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "cppm", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "cpy", text = "⚙", fg_dark = "#005ca5", fg_light = "#005ca5" },
{ name = "cr", text = "", fg_dark = "#c8c8c8", fg_light = "#434343" },
{ name = "crdownload", text = "", fg_dark = "#44cda8", fg_light = "#226654" },
{ name = "cs", text = "󰌛", fg_dark = "#596706", fg_light = "#434d04" },
{ name = "csh", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446" },
{ name = "cshtml", text = "󱦗", fg_dark = "#512bd4", fg_light = "#512bd4" },
{ name = "cson", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "csproj", text = "󰪮", fg_dark = "#512bd4", fg_light = "#512bd4" },
{ name = "css", text = "", fg_dark = "#42a5f5", fg_light = "#2c6ea3" },
{ name = "csv", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "cts", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "cu", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "cue", text = "󰲹", fg_dark = "#ed95ae", fg_light = "#764a57" },
{ name = "cuh", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "cxx", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "cxxm", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "d", text = "", fg_dark = "#427819", fg_light = "#325a13" },
{ name = "d.ts", text = "", fg_dark = "#d59855", fg_light = "#6a4c2a" },
{ name = "dart", text = "", fg_dark = "#03589c", fg_light = "#03589c" },
{ name = "db", text = "", fg_dark = "#dad8d8", fg_light = "#494848" },
{ name = "dconf", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "desktop", text = "", fg_dark = "#563d7c", fg_light = "#563d7c" },
{ name = "diff", text = "", fg_dark = "#41535b", fg_light = "#41535b" },
{ name = "dll", text = "", fg_dark = "#4d2c0b", fg_light = "#4d2c0b" },
{ name = "doc", text = "󰈬", fg_dark = "#185abd", fg_light = "#185abd" },
{ name = "Dockerfile", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99" },
{ name = "docx", text = "󰈬", fg_dark = "#185abd", fg_light = "#185abd" },
{ name = "dot", text = "󱁉", fg_dark = "#30638e", fg_light = "#244a6a" },
{ name = "download", text = "", fg_dark = "#44cda8", fg_light = "#226654" },
{ name = "drl", text = "", fg_dark = "#ffafaf", fg_light = "#553a3a" },
{ name = "dropbox", text = "", fg_dark = "#0061fe", fg_light = "#0049be" },
{ name = "dump", text = "", fg_dark = "#dad8d8", fg_light = "#494848" },
{ name = "dwg", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "dxf", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "ebook", text = "", fg_dark = "#eab16d", fg_light = "#755836" },
{ name = "edn", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "eex", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "ejs", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "el", text = "", fg_dark = "#8172be", fg_light = "#61568e" },
{ name = "elc", text = "", fg_dark = "#8172be", fg_light = "#61568e" },
{ name = "elf", text = "", fg_dark = "#9f0500", fg_light = "#9f0500" },
{ name = "elm", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "eln", text = "", fg_dark = "#8172be", fg_light = "#61568e" },
{ name = "env", text = "", fg_dark = "#faf743", fg_light = "#32310d" },
{ name = "eot", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "epp", text = "", fg_dark = "#ffa61a", fg_light = "#80530d" },
{ name = "epub", text = "", fg_dark = "#eab16d", fg_light = "#755836" },
{ name = "erb", text = "", fg_dark = "#701516", fg_light = "#701516" },
{ name = "erl", text = "", fg_dark = "#b83998", fg_light = "#8a2b72" },
{ name = "ex", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "exe", text = "", fg_dark = "#9f0500", fg_light = "#9f0500" },
{ name = "exs", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "f#", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "f3d", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "f90", text = "󱈚", fg_dark = "#734f96", fg_light = "#563b70" },
{ name = "fbx", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b" },
{ name = "fcbak", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fcmacro", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fcmat", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fcparam", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fcscript", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fcstd", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fcstd1", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fctb", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fctl", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d" },
{ name = "fdmdownload", text = "", fg_dark = "#44cda8", fg_light = "#226654" },
{ name = "fish", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446" },
{ name = "flac", text = "", fg_dark = "#0075aa", fg_light = "#005880" },
{ name = "flc", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "flf", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "fnl", text = "", fg_dark = "#fff3d7", fg_light = "#33312b" },
{ name = "fs", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "fsi", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "fsscript", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "fsx", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "gcode", text = "󰐫", fg_dark = "#1471ad", fg_light = "#0f5582" },
{ name = "gd", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "gemspec", text = "", fg_dark = "#701516", fg_light = "#701516" },
{ name = "gif", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "git", text = "", fg_dark = "#f14c28", fg_light = "#b5391e" },
{ name = "glb", text = "", fg_dark = "#ffb13b", fg_light = "#80581e" },
{ name = "gnumakefile", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "go", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "godot", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "gql", text = "", fg_dark = "#e535ab", fg_light = "#ac2880" },
{ name = "graphql", text = "", fg_dark = "#e535ab", fg_light = "#ac2880" },
{ name = "gresource", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "gv", text = "󱁉", fg_dark = "#30638e", fg_light = "#244a6a" },
{ name = "gz", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "h", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "haml", text = "", fg_dark = "#eaeae1", fg_light = "#2f2f2d" },
{ name = "hbs", text = "", fg_dark = "#f0772b", fg_light = "#a04f1d" },
{ name = "heex", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "hex", text = "", fg_dark = "#2e63ff", fg_light = "#224abf" },
{ name = "hh", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "hpp", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "hrl", text = "", fg_dark = "#b83998", fg_light = "#8a2b72" },
{ name = "hs", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "htm", text = "", fg_dark = "#e34c26", fg_light = "#aa391c" },
{ name = "html", text = "", fg_dark = "#e44d26", fg_light = "#ab3a1c" },
{ name = "huff", text = "󰡘", fg_dark = "#4242c7", fg_light = "#4242c7" },
{ name = "hurl", text = "", fg_dark = "#ff0288", fg_light = "#bf0266" },
{ name = "hx", text = "", fg_dark = "#ea8220", fg_light = "#9c5715" },
{ name = "hxx", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "ical", text = "", fg_dark = "#2b2e83", fg_light = "#2b2e83" },
{ name = "icalendar", text = "", fg_dark = "#2b2e83", fg_light = "#2b2e83" },
{ name = "ico", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "ics", text = "", fg_dark = "#2b2e83", fg_light = "#2b2e83" },
{ name = "ifb", text = "", fg_dark = "#2b2e83", fg_light = "#2b2e83" },
{ name = "ifc", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "ige", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "iges", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "igs", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "image", text = "", fg_dark = "#d0bec8", fg_light = "#453f43" },
{ name = "img", text = "", fg_dark = "#d0bec8", fg_light = "#453f43" },
{ name = "import", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "info", text = "", fg_dark = "#ffffcd", fg_light = "#333329" },
{ name = "ini", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "ino", text = "", fg_dark = "#56b6c2", fg_light = "#397981" },
{ name = "ipynb", text = "", fg_dark = "#51a0cf", fg_light = "#366b8a" },
{ name = "iso", text = "", fg_dark = "#d0bec8", fg_light = "#453f43" },
{ name = "ixx", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "java", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "jl", text = "", fg_dark = "#a270ba", fg_light = "#6c4b7c" },
{ name = "jpeg", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "jpg", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "js", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "json", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "json5", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "jsonc", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "jsx", text = "", fg_dark = "#20c2e3", fg_light = "#158197" },
{ name = "jwmrc", text = "", fg_dark = "#0078cd", fg_light = "#005a9a" },
{ name = "jxl", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "kbx", text = "󰯄", fg_dark = "#737672", fg_light = "#565856" },
{ name = "kdb", text = "", fg_dark = "#529b34", fg_light = "#3e7427" },
{ name = "kdbx", text = "", fg_dark = "#529b34", fg_light = "#3e7427" },
{ name = "kdenlive", text = "", fg_dark = "#83b8f2", fg_light = "#425c79" },
{ name = "kdenlivetitle", text = "", fg_dark = "#83b8f2", fg_light = "#425c79" },
{ name = "kicad_dru", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "kicad_mod", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "kicad_pcb", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "kicad_prl", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "kicad_pro", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "kicad_sch", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "kicad_sym", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "kicad_wks", text = "", fg_dark = "#ffffff", fg_light = "#333333" },
{ name = "ko", text = "", fg_dark = "#dcddd6", fg_light = "#494a47" },
{ name = "kpp", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7" },
{ name = "kra", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7" },
{ name = "krz", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7" },
{ name = "ksh", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446" },
{ name = "kt", text = "", fg_dark = "#7f52ff", fg_light = "#5f3ebf" },
{ name = "kts", text = "", fg_dark = "#7f52ff", fg_light = "#5f3ebf" },
{ name = "lck", text = "", fg_dark = "#bbbbbb", fg_light = "#5e5e5e" },
{ name = "leex", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "less", text = "", fg_dark = "#563d7c", fg_light = "#563d7c" },
{ name = "lff", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "lhs", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "lib", text = "", fg_dark = "#4d2c0b", fg_light = "#4d2c0b" },
{ name = "license", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "liquid", text = "", fg_dark = "#95bf47", fg_light = "#4a6024" },
{ name = "lock", text = "", fg_dark = "#bbbbbb", fg_light = "#5e5e5e" },
{ name = "log", text = "󰌱", fg_dark = "#dddddd", fg_light = "#4a4a4a" },
{ name = "lrc", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a" },
{ name = "lua", text = "", fg_dark = "#51a0cf", fg_light = "#366b8a" },
{ name = "luac", text = "", fg_dark = "#51a0cf", fg_light = "#366b8a" },
{ name = "luau", text = "", fg_dark = "#00a2ff", fg_light = "#007abf" },
{ name = "m", text = "", fg_dark = "#599eff", fg_light = "#3b69aa" },
{ name = "m3u", text = "󰲹", fg_dark = "#ed95ae", fg_light = "#764a57" },
{ name = "m3u8", text = "󰲹", fg_dark = "#ed95ae", fg_light = "#764a57" },
{ name = "m4a", text = "", fg_dark = "#00afff", fg_light = "#0075aa" },
{ name = "m4v", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10" },
{ name = "magnet", text = "", fg_dark = "#a51b16", fg_light = "#a51b16" },
{ name = "makefile", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "markdown", text = "", fg_dark = "#dddddd", fg_light = "#4a4a4a" },
{ name = "material", text = "󰔉", fg_dark = "#b83998", fg_light = "#8a2b72" },
{ name = "md", text = "", fg_dark = "#dddddd", fg_light = "#4a4a4a" },
{ name = "md5", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975" },
{ name = "mdx", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "mint", text = "󰌪", fg_dark = "#87c095", fg_light = "#44604a" },
{ name = "mjs", text = "", fg_dark = "#f1e05a", fg_light = "#504b1e" },
{ name = "mk", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "mkv", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10" },
{ name = "ml", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "mli", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "mm", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "mo", text = "∞", fg_dark = "#9772fb", fg_light = "#654ca7" },
{ name = "mobi", text = "", fg_dark = "#eab16d", fg_light = "#755836" },
{ name = "mov", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10" },
{ name = "mp3", text = "", fg_dark = "#00afff", fg_light = "#0075aa" },
{ name = "mp4", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10" },
{ name = "mpp", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "msf", text = "", fg_dark = "#137be1", fg_light = "#0e5ca9" },
{ name = "mts", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "mustache", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "nfo", text = "", fg_dark = "#ffffcd", fg_light = "#333329" },
{ name = "nim", text = "", fg_dark = "#f3d400", fg_light = "#514700" },
{ name = "nix", text = "", fg_dark = "#7ebae4", fg_light = "#3f5d72" },
{ name = "nswag", text = "", fg_dark = "#85ea2d", fg_light = "#427516" },
{ name = "nu", text = ">", fg_dark = "#3aa675", fg_light = "#276f4e" },
{ name = "o", text = "", fg_dark = "#9f0500", fg_light = "#9f0500" },
{ name = "obj", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b" },
{ name = "ogg", text = "", fg_dark = "#0075aa", fg_light = "#005880" },
{ name = "opus", text = "", fg_dark = "#0075aa", fg_light = "#005880" },
{ name = "org", text = "", fg_dark = "#77aa99", fg_light = "#4f7166" },
{ name = "otf", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "out", text = "", fg_dark = "#9f0500", fg_light = "#9f0500" },
{ name = "part", text = "", fg_dark = "#44cda8", fg_light = "#226654" },
{ name = "patch", text = "", fg_dark = "#41535b", fg_light = "#41535b" },
{ name = "pck", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "pcm", text = "", fg_dark = "#0075aa", fg_light = "#005880" },
{ name = "pdf", text = "", fg_dark = "#b30b00", fg_light = "#b30b00" },
{ name = "php", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "pl", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "pls", text = "󰲹", fg_dark = "#ed95ae", fg_light = "#764a57" },
{ name = "ply", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b" },
{ name = "pm", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "png", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "po", text = "", fg_dark = "#2596be", fg_light = "#1c708e" },
{ name = "pot", text = "", fg_dark = "#2596be", fg_light = "#1c708e" },
{ name = "pp", text = "", fg_dark = "#ffa61a", fg_light = "#80530d" },
{ name = "ppt", text = "󰈧", fg_dark = "#cb4a32", fg_light = "#983826" },
{ name = "prisma", text = "", fg_dark = "#5a67d8", fg_light = "#444da2" },
{ name = "pro", text = "", fg_dark = "#e4b854", fg_light = "#725c2a" },
{ name = "ps1", text = "󰨊", fg_dark = "#4273ca", fg_light = "#325698" },
{ name = "psb", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "psd", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "psd1", text = "󰨊", fg_dark = "#6975c4", fg_light = "#4f5893" },
{ name = "psm1", text = "󰨊", fg_dark = "#6975c4", fg_light = "#4f5893" },
{ name = "pub", text = "󰷖", fg_dark = "#e3c58e", fg_light = "#4c422f" },
{ name = "pxd", text = "", fg_dark = "#5aa7e4", fg_light = "#3c6f98" },
{ name = "pxi", text = "", fg_dark = "#5aa7e4", fg_light = "#3c6f98" },
{ name = "py", text = "", fg_dark = "#ffbc03", fg_light = "#805e02" },
{ name = "pyc", text = "", fg_dark = "#ffe291", fg_light = "#332d1d" },
{ name = "pyd", text = "", fg_dark = "#ffe291", fg_light = "#332d1d" },
{ name = "pyi", text = "", fg_dark = "#ffbc03", fg_light = "#805e02" },
{ name = "pyo", text = "", fg_dark = "#ffe291", fg_light = "#332d1d" },
{ name = "pyx", text = "", fg_dark = "#5aa7e4", fg_light = "#3c6f98" },
{ name = "qm", text = "", fg_dark = "#2596be", fg_light = "#1c708e" },
{ name = "qml", text = "", fg_dark = "#40cd52", fg_light = "#2b8937" },
{ name = "qrc", text = "", fg_dark = "#40cd52", fg_light = "#2b8937" },
{ name = "qss", text = "", fg_dark = "#40cd52", fg_light = "#2b8937" },
{ name = "query", text = "", fg_dark = "#90a850", fg_light = "#607035" },
{ name = "r", text = "󰟔", fg_dark = "#2266ba", fg_light = "#1a4c8c" },
{ name = "rake", text = "", fg_dark = "#701516", fg_light = "#701516" },
{ name = "rar", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "razor", text = "󱦘", fg_dark = "#512bd4", fg_light = "#512bd4" },
{ name = "rb", text = "", fg_dark = "#701516", fg_light = "#701516" },
{ name = "res", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "resi", text = "", fg_dark = "#f55385", fg_light = "#a33759" },
{ name = "rlib", text = "", fg_dark = "#dea584", fg_light = "#6f5242" },
{ name = "rmd", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "rproj", text = "󰗆", fg_dark = "#358a5b", fg_light = "#286844" },
{ name = "rs", text = "", fg_dark = "#dea584", fg_light = "#6f5242" },
{ name = "rss", text = "", fg_dark = "#fb9d3b", fg_light = "#7e4e1e" },
{ name = "sass", text = "", fg_dark = "#f55385", fg_light = "#a33759" },
{ name = "sbt", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "sc", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "scad", text = "", fg_dark = "#f9d72c", fg_light = "#53480f" },
{ name = "scala", text = "", fg_dark = "#cc3e44", fg_light = "#992e33" },
{ name = "scm", text = "󰘧", fg_dark = "#eeeeee", fg_light = "#303030" },
{ name = "scss", text = "", fg_dark = "#f55385", fg_light = "#a33759" },
{ name = "sh", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446" },
{ name = "sha1", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975" },
{ name = "sha224", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975" },
{ name = "sha256", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975" },
{ name = "sha384", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975" },
{ name = "sha512", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975" },
{ name = "sig", text = "λ", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "signature", text = "λ", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "skp", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "sldasm", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "sldprt", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "slim", text = "", fg_dark = "#e34c26", fg_light = "#aa391c" },
{ name = "sln", text = "", fg_dark = "#854cc7", fg_light = "#643995" },
{ name = "slvs", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "sml", text = "λ", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "so", text = "", fg_dark = "#dcddd6", fg_light = "#494a47" },
{ name = "sol", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "spec.js", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "spec.jsx", text = "", fg_dark = "#20c2e3", fg_light = "#158197" },
{ name = "spec.ts", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "spec.tsx", text = "", fg_dark = "#1354bf", fg_light = "#1354bf" },
{ name = "sql", text = "", fg_dark = "#dad8d8", fg_light = "#494848" },
{ name = "sqlite", text = "", fg_dark = "#dad8d8", fg_light = "#494848" },
{ name = "sqlite3", text = "", fg_dark = "#dad8d8", fg_light = "#494848" },
{ name = "srt", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a" },
{ name = "ssa", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a" },
{ name = "ste", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "step", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "stl", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b" },
{ name = "stp", text = "󰻫", fg_dark = "#839463", fg_light = "#576342" },
{ name = "strings", text = "", fg_dark = "#2596be", fg_light = "#1c708e" },
{ name = "styl", text = "", fg_dark = "#8dc149", fg_light = "#466024" },
{ name = "sub", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a" },
{ name = "sublime", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "suo", text = "", fg_dark = "#854cc7", fg_light = "#643995" },
{ name = "sv", text = "󰍛", fg_dark = "#019833", fg_light = "#017226" },
{ name = "svelte", text = "", fg_dark = "#ff3e00", fg_light = "#bf2e00" },
{ name = "svg", text = "󰜡", fg_dark = "#ffb13b", fg_light = "#80581e" },
{ name = "svh", text = "󰍛", fg_dark = "#019833", fg_light = "#017226" },
{ name = "swift", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "t", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "tbc", text = "󰛓", fg_dark = "#1e5cb3", fg_light = "#1e5cb3" },
{ name = "tcl", text = "󰛓", fg_dark = "#1e5cb3", fg_light = "#1e5cb3" },
{ name = "templ", text = "", fg_dark = "#dbbd30", fg_light = "#6e5e18" },
{ name = "terminal", text = "", fg_dark = "#31b53e", fg_light = "#217929" },
{ name = "test.js", text = "", fg_dark = "#cbcb41", fg_light = "#666620" },
{ name = "test.jsx", text = "", fg_dark = "#20c2e3", fg_light = "#158197" },
{ name = "test.ts", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "test.tsx", text = "", fg_dark = "#1354bf", fg_light = "#1354bf" },
{ name = "tex", text = "", fg_dark = "#3d6117", fg_light = "#3d6117" },
{ name = "tf", text = "", fg_dark = "#5f43e9", fg_light = "#4732af" },
{ name = "tfvars", text = "", fg_dark = "#5f43e9", fg_light = "#4732af" },
{ name = "tgz", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "tmux", text = "", fg_dark = "#14ba19", fg_light = "#0f8c13" },
{ name = "toml", text = "", fg_dark = "#9c4221", fg_light = "#753219" },
{ name = "torrent", text = "", fg_dark = "#44cda8", fg_light = "#226654" },
{ name = "tres", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "ts", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "tscn", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "tsconfig", text = "", fg_dark = "#ff8700", fg_light = "#aa5a00" },
{ name = "tsx", text = "", fg_dark = "#1354bf", fg_light = "#1354bf" },
{ name = "ttf", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "twig", text = "", fg_dark = "#8dc149", fg_light = "#466024" },
{ name = "txt", text = "󰈙", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "txz", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "typoscript", text = "", fg_dark = "#ff8700", fg_light = "#aa5a00" },
{ name = "ui", text = "", fg_dark = "#0c306e", fg_light = "#0c306e" },
{ name = "v", text = "󰍛", fg_dark = "#019833", fg_light = "#017226" },
{ name = "vala", text = "", fg_dark = "#7239b3", fg_light = "#562b86" },
{ name = "vh", text = "󰍛", fg_dark = "#019833", fg_light = "#017226" },
{ name = "vhd", text = "󰍛", fg_dark = "#019833", fg_light = "#017226" },
{ name = "vhdl", text = "󰍛", fg_dark = "#019833", fg_light = "#017226" },
{ name = "vim", text = "", fg_dark = "#019833", fg_light = "#017226" },
{ name = "vsh", text = "", fg_dark = "#5d87bf", fg_light = "#3e5a7f" },
{ name = "vsix", text = "", fg_dark = "#854cc7", fg_light = "#643995" },
{ name = "vue", text = "", fg_dark = "#8dc149", fg_light = "#466024" },
{ name = "wasm", text = "", fg_dark = "#5c4cdb", fg_light = "#4539a4" },
{ name = "wav", text = "", fg_dark = "#00afff", fg_light = "#0075aa" },
{ name = "webm", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10" },
{ name = "webmanifest", text = "", fg_dark = "#f1e05a", fg_light = "#504b1e" },
{ name = "webp", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83" },
{ name = "webpack", text = "󰜫", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "wma", text = "", fg_dark = "#00afff", fg_light = "#0075aa" },
{ name = "woff", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "woff2", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f" },
{ name = "wrl", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b" },
{ name = "wrz", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b" },
{ name = "x", text = "", fg_dark = "#599eff", fg_light = "#3b69aa" },
{ name = "xaml", text = "󰙳", fg_dark = "#512bd4", fg_light = "#512bd4" },
{ name = "xcf", text = "", fg_dark = "#635b46", fg_light = "#4a4434" },
{ name = "xcplayground", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "xcstrings", text = "", fg_dark = "#2596be", fg_light = "#1c708e" },
{ name = "xls", text = "󰈛", fg_dark = "#207245", fg_light = "#207245" },
{ name = "xlsx", text = "󰈛", fg_dark = "#207245", fg_light = "#207245" },
{ name = "xm", text = "", fg_dark = "#519aba", fg_light = "#36677c" },
{ name = "xml", text = "󰗀", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "xpi", text = "", fg_dark = "#ff1b01", fg_light = "#bf1401" },
{ name = "xul", text = "", fg_dark = "#e37933", fg_light = "#975122" },
{ name = "xz", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "yaml", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "yml", text = "", fg_dark = "#6d8086", fg_light = "#526064" },
{ name = "zig", text = "", fg_dark = "#f69a1b", fg_light = "#7b4d0e" },
{ name = "zip", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
{ name = "zsh", text = "", fg_dark = "#89e051", fg_light = "#447028" },
{ name = "zst", text = "", fg_dark = "#eca517", fg_light = "#76520c" },
]
conds = [
# Special files
{ name = "*", is = "orphan", text = "" },
{ name = "*", is = "link" , text = "" },
{ name = "*", is = "block" , text = "" },
{ name = "*", is = "char" , text = "" },
{ name = "*", is = "fifo" , text = "" },
{ name = "*", is = "sock" , text = "" },
{ name = "*", is = "sticky", text = "" },
{ name = "*", is = "exec" , text = "" },
{ cond = "orphan", text = "" },
{ cond = "link" , text = "" },
{ cond = "block" , text = "" },
{ cond = "char" , text = "" },
{ cond = "fifo" , text = "" },
{ cond = "sock" , text = "" },
{ cond = "sticky", text = "" },
# Default
{ name = "*" , text = "" },
{ name = "*/", text = "" },
# Fallback
{ cond = "dir", text = "" },
{ cond = "exec", text = "" },
{ cond = "!dir", text = "" },
]
# : }}}

View File

@ -36,7 +36,7 @@ impl TryFrom<&str> for Pattern {
let inner = GlobBuilder::new(b)
.case_insensitive(a.len() == s.len())
.literal_separator(false)
.literal_separator(true)
.backslash_escape(false)
.empty_alternates(true)
.build()?

View File

@ -1,78 +0,0 @@
use std::ops::Deref;
use serde::{Deserialize, Deserializer};
use yazi_shared::{fs::File, theme::{Color, StyleShadow}};
use crate::{preset::Preset, theme::Is, Pattern};
pub struct Icon {
is: Is,
name: Pattern,
inner: yazi_shared::theme::Icon,
}
impl Deref for Icon {
type Target = yazi_shared::theme::Icon;
fn deref(&self) -> &Self::Target { &self.inner }
}
impl Icon {
pub fn matches(&self, file: &File) -> bool {
if !self.is.check(&file.cha) {
return false;
}
self.name.match_path(&file.url, file.is_dir())
}
}
impl Icon {
pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<Icon>, D::Error>
where
D: Deserializer<'de>,
{
#[derive(Deserialize)]
struct IconOuter {
rules: Vec<IconRule>,
#[serde(default)]
prepend_rules: Vec<IconRule>,
#[serde(default)]
append_rules: Vec<IconRule>,
}
#[derive(Deserialize)]
struct IconRule {
#[serde(default)]
is: Is,
name: Pattern,
text: String,
fg: Option<Color>,
}
let mut outer = IconOuter::deserialize(deserializer)?;
if outer.append_rules.iter().any(|r| r.name.any_file()) {
outer.rules.retain(|r| !r.name.any_file());
}
if outer.append_rules.iter().any(|r| r.name.any_dir()) {
outer.rules.retain(|r| !r.name.any_dir());
}
Preset::mix(&mut outer.rules, outer.prepend_rules, outer.append_rules);
Ok(
outer
.rules
.into_iter()
.map(|r| Icon {
is: r.is,
name: r.name,
inner: yazi_shared::theme::Icon {
text: r.text,
style: StyleShadow { fg: r.fg, ..Default::default() }.into(),
},
})
.collect(),
)
}
}

View File

@ -0,0 +1,158 @@
use std::collections::HashMap;
use anyhow::Result;
use serde::{Deserialize, Deserializer};
use yazi_shared::{fs::File, theme::{Color, Icon, Style}, Condition};
use crate::{Pattern, Preset};
pub struct Icons {
globs: Vec<(Pattern, Icon)>,
dirs: HashMap<String, Icon>,
files: HashMap<String, Icon>,
exts: HashMap<String, Icon>,
conds: Vec<(Condition, Icon)>,
}
impl Icons {
pub fn matches(&self, file: &File) -> Option<&Icon> {
if let Some((_, i)) = self.globs.iter().find(|(p, _)| p.match_path(&file.url, file.is_dir())) {
return Some(i);
}
if let Some(i) = self.match_name(file) {
return Some(i);
}
let f = |s: &str| match s {
"dir" => file.is_dir(),
"hidden" => file.is_hidden(),
"link" => file.is_link(),
"orphan" => file.is_orphan(),
"block" => file.is_block(),
"char" => file.is_char(),
"fifo" => file.is_fifo(),
"sock" => file.is_sock(),
"exec" => file.is_exec(),
"sticky" => file.is_sticky(),
_ => false,
};
self.conds.iter().find(|(c, _)| c.eval(f) == Some(true)).map(|(_, i)| i)
}
#[inline]
fn match_name(&self, file: &File) -> Option<&Icon> {
let name = file.name()?.to_str()?;
if let Some(i) = if file.is_dir() { self.dirs.get(name) } else { self.files.get(name) } {
return Some(i);
}
self.exts.get(file.url.extension()?.to_str()?)
}
}
impl<'de> Deserialize<'de> for Icons {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: Deserializer<'de>,
{
#[derive(Deserialize)]
pub struct Shadow {
globs: Vec<ShadowPat>,
#[serde(default)]
prepend_globs: Vec<ShadowPat>,
#[serde(default)]
append_globs: Vec<ShadowPat>,
dirs: Vec<ShadowStr>,
#[serde(default)]
prepend_dirs: Vec<ShadowStr>,
#[serde(default)]
append_dirs: Vec<ShadowStr>,
files: Vec<ShadowStr>,
#[serde(default)]
prepend_files: Vec<ShadowStr>,
#[serde(default)]
append_files: Vec<ShadowStr>,
exts: Vec<ShadowStr>,
#[serde(default)]
prepend_exts: Vec<ShadowStr>,
#[serde(default)]
append_exts: Vec<ShadowStr>,
conds: Vec<ShadowCond>,
#[serde(default)]
prepend_conds: Vec<ShadowCond>,
#[serde(default)]
append_conds: Vec<ShadowCond>,
}
#[derive(Deserialize)]
pub struct ShadowPat {
name: Pattern,
text: String,
fg_dark: Option<Color>,
#[allow(dead_code)]
fg_light: Option<Color>,
}
#[derive(Deserialize)]
pub struct ShadowStr {
name: String,
text: String,
fg_dark: Option<Color>,
#[allow(dead_code)]
fg_light: Option<Color>,
}
#[derive(Deserialize)]
pub struct ShadowCond {
cond: Condition,
text: String,
fg_dark: Option<Color>,
#[allow(dead_code)]
fg_light: Option<Color>,
}
let mut shadow = Shadow::deserialize(deserializer)?;
Preset::mix(&mut shadow.globs, shadow.prepend_globs, shadow.append_globs);
Preset::mix(&mut shadow.dirs, shadow.prepend_dirs, shadow.append_dirs);
Preset::mix(&mut shadow.files, shadow.prepend_files, shadow.append_files);
Preset::mix(&mut shadow.exts, shadow.prepend_exts, shadow.append_exts);
Preset::mix(&mut shadow.conds, shadow.prepend_conds, shadow.append_conds);
let globs = shadow
.globs
.into_iter()
.map(|v| {
(v.name, Icon { text: v.text, style: Style { fg: v.fg_dark, ..Default::default() } })
})
.collect();
let conds = shadow
.conds
.into_iter()
.map(|v| {
(v.cond, Icon { text: v.text, style: Style { fg: v.fg_dark, ..Default::default() } })
})
.collect();
fn as_map(v: Vec<ShadowStr>) -> HashMap<String, Icon> {
let mut map = HashMap::with_capacity(v.len());
for item in v {
map.entry(item.name).or_insert(Icon {
text: item.text,
style: Style { fg: item.fg_dark, ..Default::default() },
});
}
map.shrink_to_fit();
map
}
Ok(Self {
globs,
dirs: as_map(shadow.dirs),
files: as_map(shadow.files),
exts: as_map(shadow.exts),
conds,
})
}
}

View File

@ -48,13 +48,13 @@ impl Is {
pub fn check(&self, cha: &Cha) -> bool {
match self {
Self::None => true,
Self::Block => cha.is_block_device(),
Self::Char => cha.is_char_device(),
Self::Block => cha.is_block(),
Self::Char => cha.is_char(),
Self::Exec => cha.is_exec(),
Self::Fifo => cha.is_fifo(),
Self::Link => cha.is_link(),
Self::Orphan => cha.is_orphan(),
Self::Sock => cha.is_socket(),
Self::Sock => cha.is_sock(),
Self::Sticky => cha.is_sticky(),
}
}

View File

@ -1,11 +1,11 @@
mod filetype;
mod flavor;
mod icon;
mod icons;
mod is;
mod theme;
pub use filetype::*;
pub use flavor::*;
pub use icon::*;
pub use icons::*;
pub use is::*;
pub use theme::*;

View File

@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
use validator::Validate;
use yazi_shared::{fs::expand_path, theme::Style, Xdg};
use super::{Filetype, Flavor, Icon};
use super::{Filetype, Flavor, Icons};
use crate::{validation::check_validation, MERGED_THEME};
#[derive(Deserialize, Serialize)]
@ -23,8 +23,8 @@ pub struct Theme {
// File-specific styles
#[serde(rename = "filetype", deserialize_with = "Filetype::deserialize", skip_serializing)]
pub filetypes: Vec<Filetype>,
#[serde(rename = "icon", deserialize_with = "Icon::deserialize", skip_serializing)]
pub icons: Vec<Icon>,
#[serde(rename = "icon", skip_serializing)]
pub icons: Icons,
}
impl Default for Theme {

View File

@ -25,7 +25,7 @@ crossterm = "0.27.0"
dirs = "5.0.1"
futures = "0.3.30"
notify = { version = "6.1.1", default-features = false, features = [ "macos_fsevent" ] }
parking_lot = "0.12.2"
parking_lot = "0.12.3"
ratatui = "0.26.3"
regex = "1.10.4"
scopeguard = "1.2.0"

View File

@ -19,7 +19,7 @@ yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
# External dependencies
anyhow = "1.0.86"
mlua = { version = "0.9.8", features = [ "lua54" ] }
parking_lot = "0.12.2"
parking_lot = "0.12.3"
serde = { version = "1.0.202", features = [ "derive" ] }
serde_json = "1.0.117"
tokio = { version = "1.37.0", features = [ "full" ] }

View File

@ -62,8 +62,8 @@ impl File {
match me.icon.get() {
IconCache::Missing => {
let matched = THEME.icons.iter().find(|&i| i.matches(me));
me.icon.set(matched.map_or(IconCache::Undefined, |i| IconCache::Icon(i)));
let matched = THEME.icons.matches(me);
me.icon.set(matched.map_or(IconCache::Undefined, IconCache::Icon));
matched.map(|i| Icon::cast(lua, i)).transpose()
}
IconCache::Undefined => Ok(None),

View File

@ -28,7 +28,7 @@ crossterm = "0.27.0"
futures = "0.3.30"
md-5 = "0.10.6"
mlua = { version = "0.9.8", features = [ "lua54", "serialize", "macros", "async" ] }
parking_lot = "0.12.2"
parking_lot = "0.12.3"
ratatui = "0.26.3"
serde = "1.0.202"
serde_json = "1.0.117"

View File

@ -13,10 +13,13 @@ impl Cha {
reg.add_field_method_get("is_hidden", |_, me| Ok(me.is_hidden()));
reg.add_field_method_get("is_link", |_, me| Ok(me.is_link()));
reg.add_field_method_get("is_orphan", |_, me| Ok(me.is_orphan()));
reg.add_field_method_get("is_block_device", |_, me| Ok(me.is_block_device()));
reg.add_field_method_get("is_char_device", |_, me| Ok(me.is_char_device()));
// TODO: rename to `is_block`
reg.add_field_method_get("is_block_device", |_, me| Ok(me.is_block()));
// TODO: rename to `is_char`
reg.add_field_method_get("is_char_device", |_, me| Ok(me.is_char()));
reg.add_field_method_get("is_fifo", |_, me| Ok(me.is_fifo()));
reg.add_field_method_get("is_socket", |_, me| Ok(me.is_socket()));
// TODO: rename to `is_sock`
reg.add_field_method_get("is_socket", |_, me| Ok(me.is_sock()));
reg.add_field_method_get("is_exec", |_, me| Ok(me.is_exec()));
reg.add_field_method_get("is_sticky", |_, me| Ok(me.is_sticky()));

View File

@ -19,7 +19,7 @@ yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
anyhow = "1.0.86"
async-priority-channel = "0.2.0"
futures = "0.3.30"
parking_lot = "0.12.2"
parking_lot = "0.12.3"
scopeguard = "1.2.0"
tokio = { version = "1.37.0", features = [ "full" ] }

View File

@ -16,7 +16,7 @@ crossterm = "0.27.0"
dirs = "5.0.1"
filetime = "0.2.23"
futures = "0.3.30"
parking_lot = "0.12.2"
parking_lot = "0.12.3"
percent-encoding = "2.3.1"
ratatui = "0.26.3"
regex = "1.10.4"

View File

@ -105,16 +105,16 @@ impl Cha {
pub fn is_orphan(&self) -> bool { self.kind.contains(ChaKind::ORPHAN) }
#[inline]
pub fn is_block_device(&self) -> bool { self.kind.contains(ChaKind::BLOCK_DEVICE) }
pub fn is_block(&self) -> bool { self.kind.contains(ChaKind::BLOCK_DEVICE) }
#[inline]
pub fn is_char_device(&self) -> bool { self.kind.contains(ChaKind::CHAR_DEVICE) }
pub fn is_char(&self) -> bool { self.kind.contains(ChaKind::CHAR_DEVICE) }
#[inline]
pub fn is_fifo(&self) -> bool { self.kind.contains(ChaKind::FIFO) }
#[inline]
pub fn is_socket(&self) -> bool { self.kind.contains(ChaKind::SOCKET) }
pub fn is_sock(&self) -> bool { self.kind.contains(ChaKind::SOCKET) }
#[inline]
pub fn is_exec(&self) -> bool {

View File

@ -1,6 +1,6 @@
use std::str::FromStr;
use anyhow::Result;
use anyhow::{anyhow, Result};
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Deserialize)]
@ -11,7 +11,7 @@ impl FromStr for Color {
type Err = anyhow::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
ratatui::style::Color::from_str(s).map(Self).map_err(|_| anyhow::anyhow!("invalid color"))
ratatui::style::Color::from_str(s).map(Self).map_err(|_| anyhow!("invalid color: {s}"))
}
}

View File

@ -3,7 +3,7 @@ use serde::{ser::SerializeMap, Deserialize, Serialize, Serializer};
use super::Color;
#[derive(Clone, Copy, Debug, Deserialize)]
#[derive(Clone, Copy, Debug, Default, Deserialize)]
#[serde(from = "StyleShadow")]
pub struct Style {
pub fg: Option<Color>,