diff --git a/cspell.json b/cspell.json index c1f5d8e5d..7a8cc8e88 100644 --- a/cspell.json +++ b/cspell.json @@ -1 +1 @@ -{"language":"en","flagWords":[],"words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","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","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds","translit","rxvt","Urxvt","realpath","realname","REPARSE","hardlink","hardlinking","nlink","nlink","linemodes","SIGSTOP","sevenzip","rsplitn","replacen","DECSET","DECRQM","repeek","cwds","tcsi","Hyprland","Wayfire","SWAYSOCK","btime","nsec","codegen","gethostname","fchmod","fdfind","Rustc","rustc","Sysinfo","ffprobe","vframes"],"version":"0.2"} \ No newline at end of file +{"version":"0.2","flagWords":[],"words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","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","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds","translit","rxvt","Urxvt","realpath","realname","REPARSE","hardlink","hardlinking","nlink","nlink","linemodes","SIGSTOP","sevenzip","rsplitn","replacen","DECSET","DECRQM","repeek","cwds","tcsi","Hyprland","Wayfire","SWAYSOCK","btime","nsec","codegen","gethostname","fchmod","fdfind","Rustc","rustc","Sysinfo","ffprobe","vframes","luma"],"language":"en"} \ No newline at end of file diff --git a/scripts/icons/generate.lua b/scripts/icons/generate.lua index 1997f9cf2..da98fccb9 100644 --- a/scripts/icons/generate.lua +++ b/scripts/icons/generate.lua @@ -21,16 +21,25 @@ function dump(map) 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) + local dark, light = "", "" 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)) + dark = dark .. string.format('\t{ name = "%s", text = "%s", fg = "%s" },\n', v.name, v.text, v.fg_dark) + light = light .. string.format('\t{ name = "%s", text = "%s", fg = "%s" },\n', v.name, v.text, v.fg_light) end + return dark, light end -print("files = [") -dump(rearrange("files")) -print("]") +function save(typ, files, exts) + local p = string.format("../../yazi-config/preset/theme+%s.toml", typ) + local s = io.open(p, "r"):read("*a") + s = s:gsub("files = %[\n(.-)\n%]", string.format("files = [\n%s]", files)) + s = s:gsub("exts = %[\n(.-)\n%]", string.format("exts = [\n%s]", exts)) + io.open(p, "w"):write(s) +end + +local dark_files, light_files = dump(rearrange("files")) +local dark_exts, light_exts = dump(rearrange("exts")) -print("exts = [") -dump(rearrange("exts")) -print("]") +save("dark", dark_files, dark_exts) +save("light", light_files, light_exts) diff --git a/yazi-adapter/src/adapter.rs b/yazi-adapter/src/adapter.rs index 7f2812348..a3537ea7d 100644 --- a/yazi-adapter/src/adapter.rs +++ b/yazi-adapter/src/adapter.rs @@ -5,8 +5,7 @@ use ratatui::layout::Rect; use tracing::warn; use yazi_shared::env_exists; -use super::{Iip, Kgp, KgpOld}; -use crate::{Chafa, Emulator, SHOWN, Sixel, TMUX, Ueberzug, WSL}; +use crate::{Brand, Emulator, SHOWN, TMUX, WSL, drivers}; #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum Adapter { @@ -42,12 +41,12 @@ impl Adapter { } match self { - Self::Kgp => Kgp::image_show(path, max).await, - Self::KgpOld => KgpOld::image_show(path, max).await, - Self::Iip => Iip::image_show(path, max).await, - Self::Sixel => Sixel::image_show(path, max).await, - Self::X11 | Self::Wayland => Ueberzug::image_show(path, max).await, - Self::Chafa => Chafa::image_show(path, max).await, + Self::Kgp => drivers::Kgp::image_show(path, max).await, + Self::KgpOld => drivers::KgpOld::image_show(path, max).await, + Self::Iip => drivers::Iip::image_show(path, max).await, + Self::Sixel => drivers::Sixel::image_show(path, max).await, + Self::X11 | Self::Wayland => drivers::Ueberzug::image_show(path, max).await, + Self::Chafa => drivers::Chafa::image_show(path, max).await, } } @@ -57,12 +56,12 @@ impl Adapter { pub fn image_erase(self, area: Rect) -> Result<()> { match self { - Self::Kgp => Kgp::image_erase(area), - Self::KgpOld => KgpOld::image_erase(area), - Self::Iip => Iip::image_erase(area), - Self::Sixel => Sixel::image_erase(area), - Self::X11 | Self::Wayland => Ueberzug::image_erase(area), - Self::Chafa => Chafa::image_erase(area), + Self::Kgp => drivers::Kgp::image_erase(area), + Self::KgpOld => drivers::KgpOld::image_erase(area), + Self::Iip => drivers::Iip::image_erase(area), + Self::Sixel => drivers::Sixel::image_erase(area), + Self::X11 | Self::Wayland => drivers::Ueberzug::image_erase(area), + Self::Chafa => drivers::Chafa::image_erase(area), } } @@ -72,7 +71,7 @@ impl Adapter { #[inline] pub(super) fn shown_store(area: Rect) { SHOWN.set(Some(area)); } - pub(super) fn start(self) { Ueberzug::start(self); } + pub(super) fn start(self) { drivers::Ueberzug::start(self); } #[inline] pub(super) fn needs_ueberzug(self) -> bool { @@ -81,15 +80,14 @@ impl Adapter { } impl Adapter { - pub fn matches() -> Self { - let emulator = Emulator::detect(); - if matches!(emulator, Emulator::Microsoft) { + pub fn matches(emulator: Emulator) -> Self { + if matches!(emulator.kind.left(), Some(Brand::Microsoft)) { return Self::Sixel; - } else if *WSL && matches!(emulator, Emulator::WezTerm) { + } else if *WSL && matches!(emulator.kind.left(), Some(Brand::WezTerm)) { return Self::KgpOld; } - let mut protocols = emulator.adapters(); + let mut protocols = emulator.adapters().to_owned(); #[cfg(windows)] protocols.retain(|p| *p == Self::Iip); if env_exists("ZELLIJ_SESSION_NAME") { @@ -101,7 +99,7 @@ impl Adapter { return *p; } - let supported_compositor = Ueberzug::supported_compositor(); + let supported_compositor = drivers::Ueberzug::supported_compositor(); match env::var("XDG_SESSION_TYPE").unwrap_or_default().as_str() { "x11" => return Self::X11, "wayland" if supported_compositor => return Self::Wayland, diff --git a/yazi-adapter/src/brand.rs b/yazi-adapter/src/brand.rs new file mode 100644 index 000000000..5aa7b69e3 --- /dev/null +++ b/yazi-adapter/src/brand.rs @@ -0,0 +1,119 @@ +use tracing::warn; +use yazi_shared::env_exists; + +use crate::Mux; + +#[derive(Clone, Copy, Debug)] +pub enum Brand { + Kitty, + Konsole, + Iterm2, + WezTerm, + Foot, + Ghostty, + Microsoft, + Rio, + BlackBox, + VSCode, + Tabby, + Hyper, + Mintty, + Neovim, + Apple, + Urxvt, +} + +impl Brand { + pub fn from_env() -> Option { + use Brand as B; + + if env_exists("NVIM_LOG_FILE") && env_exists("NVIM") { + return Some(Self::Neovim); + } + + let vars = [ + ("KITTY_WINDOW_ID", B::Kitty), + ("KONSOLE_VERSION", B::Konsole), + ("ITERM_SESSION_ID", B::Iterm2), + ("WEZTERM_EXECUTABLE", B::WezTerm), + ("GHOSTTY_RESOURCES_DIR", B::Ghostty), + ("WT_Session", B::Microsoft), + ("VSCODE_INJECTION", B::VSCode), + ("TABBY_CONFIG_DIRECTORY", B::Tabby), + ]; + match vars.into_iter().find(|&(s, _)| env_exists(s)) { + Some((_, brand)) => return Some(brand), + None => warn!("[Adapter] No special environment variables detected"), + } + + let (term, program) = B::env(); + match program.as_str() { + "iTerm.app" => return Some(B::Iterm2), + "WezTerm" => return Some(B::WezTerm), + "ghostty" => return Some(B::Ghostty), + "rio" => return Some(B::Rio), + "BlackBox" => return Some(B::BlackBox), + "vscode" => return Some(B::VSCode), + "Tabby" => return Some(B::Tabby), + "Hyper" => return Some(B::Hyper), + "mintty" => return Some(B::Mintty), + "Apple_Terminal" => return Some(B::Apple), + _ => warn!("[Adapter] Unknown TERM_PROGRAM: {program}"), + } + match term.as_str() { + "xterm-kitty" => return Some(B::Kitty), + "foot" => return Some(B::Foot), + "foot-extra" => return Some(B::Foot), + "xterm-ghostty" => return Some(B::Ghostty), + "rio" => return Some(B::Rio), + "rxvt-unicode-256color" => return Some(B::Urxvt), + _ => warn!("[Adapter] Unknown TERM: {term}"), + } + None + } + + pub(super) fn from_csi(resp: &str) -> Option { + let names = [ + ("kitty", Self::Kitty), + ("Konsole", Self::Konsole), + ("iTerm2", Self::Iterm2), + ("WezTerm", Self::WezTerm), + ("foot", Self::Foot), + ("ghostty", Self::Ghostty), + ]; + names.into_iter().find(|&(n, _)| resp.contains(n)).map(|(_, b)| b) + } + + pub(super) fn adapters(self) -> &'static [crate::Adapter] { + use Brand as B; + + use crate::Adapter as A; + + match self { + B::Kitty => &[A::Kgp], + B::Konsole => &[A::KgpOld], + B::Iterm2 => &[A::Iip, A::Sixel], + B::WezTerm => &[A::Iip, A::Sixel], + B::Foot => &[A::Sixel], + B::Ghostty => &[A::Kgp], + B::Microsoft => &[A::Sixel], + B::Rio => &[A::Iip, A::Sixel], + B::BlackBox => &[A::Sixel], + B::VSCode => &[A::Iip, A::Sixel], + B::Tabby => &[A::Iip, A::Sixel], + B::Hyper => &[A::Iip, A::Sixel], + B::Mintty => &[A::Iip], + B::Neovim => &[], + B::Apple => &[], + B::Urxvt => &[], + } + } + + fn env() -> (String, String) { + let (term, program) = Mux::term_program(); + ( + term.unwrap_or(std::env::var("TERM").unwrap_or_default()), + program.unwrap_or(std::env::var("TERM_PROGRAM").unwrap_or_default()), + ) + } +} diff --git a/yazi-adapter/src/chafa.rs b/yazi-adapter/src/drivers/chafa.rs similarity index 91% rename from yazi-adapter/src/chafa.rs rename to yazi-adapter/src/drivers/chafa.rs index 5fe5570f8..63bc9ff26 100644 --- a/yazi-adapter/src/chafa.rs +++ b/yazi-adapter/src/drivers/chafa.rs @@ -8,10 +8,10 @@ use tokio::process::Command; use crate::{Adapter, Emulator}; -pub(super) struct Chafa; +pub(crate) struct Chafa; impl Chafa { - pub(super) async fn image_show(path: &Path, max: Rect) -> Result { + pub(crate) async fn image_show(path: &Path, max: Rect) -> Result { let output = Command::new("chafa") .args([ "-f", @@ -64,7 +64,7 @@ impl Chafa { }) } - pub(super) fn image_erase(area: Rect) -> Result<()> { + pub(crate) fn image_erase(area: Rect) -> Result<()> { let s = " ".repeat(area.width as usize); Emulator::move_lock((0, 0), |stderr| { for y in area.top()..area.bottom() { diff --git a/yazi-adapter/src/iip.rs b/yazi-adapter/src/drivers/iip.rs similarity index 88% rename from yazi-adapter/src/iip.rs rename to yazi-adapter/src/drivers/iip.rs index fe039d907..406570acf 100644 --- a/yazi-adapter/src/iip.rs +++ b/yazi-adapter/src/drivers/iip.rs @@ -7,13 +7,12 @@ use image::{DynamicImage, ExtendedColorType, ImageEncoder, codecs::{jpeg::JpegEn use ratatui::layout::Rect; use yazi_config::PREVIEW; -use super::image::Image; -use crate::{CLOSE, Emulator, START, adapter::Adapter}; +use crate::{CLOSE, Emulator, Image, START, adapter::Adapter}; -pub(super) struct Iip; +pub(crate) struct Iip; impl Iip { - pub(super) async fn image_show(path: &Path, max: Rect) -> Result { + pub(crate) async fn image_show(path: &Path, max: Rect) -> Result { let img = Image::downscale(path, max).await?; let area = Image::pixel_area((img.width(), img.height()), max); let b = Self::encode(img).await?; @@ -26,7 +25,7 @@ impl Iip { }) } - pub(super) fn image_erase(area: Rect) -> Result<()> { + pub(crate) fn image_erase(area: Rect) -> Result<()> { let s = " ".repeat(area.width as usize); Emulator::move_lock((0, 0), |stderr| { for y in area.top()..area.bottom() { diff --git a/yazi-adapter/src/kgp.rs b/yazi-adapter/src/drivers/kgp.rs similarity index 96% rename from yazi-adapter/src/kgp.rs rename to yazi-adapter/src/drivers/kgp.rs index e6aa7e588..cbae32b8a 100644 --- a/yazi-adapter/src/kgp.rs +++ b/yazi-adapter/src/drivers/kgp.rs @@ -7,8 +7,7 @@ use crossterm::{cursor::MoveTo, queue}; use image::DynamicImage; use ratatui::layout::Rect; -use super::image::Image; -use crate::{CLOSE, ESCAPE, Emulator, START, adapter::Adapter}; +use crate::{CLOSE, ESCAPE, Emulator, START, adapter::Adapter, image::Image}; static DIACRITICS: [char; 297] = [ '\u{0305}', @@ -310,10 +309,10 @@ static DIACRITICS: [char; 297] = [ '\u{1D244}', ]; -pub(super) struct Kgp; +pub(crate) struct Kgp; impl Kgp { - pub(super) async fn image_show(path: &Path, max: Rect) -> Result { + pub(crate) async fn image_show(path: &Path, max: Rect) -> Result { let img = Image::downscale(path, max).await?; let area = Image::pixel_area((img.width(), img.height()), max); @@ -329,7 +328,7 @@ impl Kgp { }) } - pub(super) fn image_erase(area: Rect) -> Result<()> { + pub(crate) fn image_erase(area: Rect) -> Result<()> { let s = " ".repeat(area.width as usize); Emulator::move_lock((0, 0), |stderr| { for y in area.top()..area.bottom() { diff --git a/yazi-adapter/src/kgp_old.rs b/yazi-adapter/src/drivers/kgp_old.rs similarity index 88% rename from yazi-adapter/src/kgp_old.rs rename to yazi-adapter/src/drivers/kgp_old.rs index 3d483005a..86c88159e 100644 --- a/yazi-adapter/src/kgp_old.rs +++ b/yazi-adapter/src/drivers/kgp_old.rs @@ -6,13 +6,12 @@ use base64::{Engine, engine::general_purpose}; use image::DynamicImage; use ratatui::layout::Rect; -use super::image::Image; -use crate::{CLOSE, ESCAPE, Emulator, START, adapter::Adapter}; +use crate::{CLOSE, ESCAPE, Emulator, Image, START, adapter::Adapter}; -pub(super) struct KgpOld; +pub(crate) struct KgpOld; impl KgpOld { - pub(super) async fn image_show(path: &Path, max: Rect) -> Result { + pub(crate) async fn image_show(path: &Path, max: Rect) -> Result { let img = Image::downscale(path, max).await?; let area = Image::pixel_area((img.width(), img.height()), max); let b = Self::encode(img).await?; @@ -26,7 +25,7 @@ impl KgpOld { } #[inline] - pub(super) fn image_erase(_: Rect) -> Result<()> { + pub(crate) fn image_erase(_: Rect) -> Result<()> { let mut stderr = LineWriter::new(stderr()); write!(stderr, "{}_Gq=2,a=d,d=A{}\\{}", START, ESCAPE, CLOSE)?; stderr.flush()?; diff --git a/yazi-adapter/src/drivers/mod.rs b/yazi-adapter/src/drivers/mod.rs new file mode 100644 index 000000000..57eeaf4ff --- /dev/null +++ b/yazi-adapter/src/drivers/mod.rs @@ -0,0 +1 @@ +yazi_macro::mod_flat!(chafa iip kgp kgp_old sixel ueberzug); diff --git a/yazi-adapter/src/sixel.rs b/yazi-adapter/src/drivers/sixel.rs similarity index 94% rename from yazi-adapter/src/sixel.rs rename to yazi-adapter/src/drivers/sixel.rs index 06a551c2a..859fea38c 100644 --- a/yazi-adapter/src/sixel.rs +++ b/yazi-adapter/src/drivers/sixel.rs @@ -9,10 +9,10 @@ use yazi_config::PREVIEW; use crate::{CLOSE, ESCAPE, Emulator, Image, START, adapter::Adapter}; -pub(super) struct Sixel; +pub(crate) struct Sixel; impl Sixel { - pub(super) async fn image_show(path: &Path, max: Rect) -> Result { + pub(crate) async fn image_show(path: &Path, max: Rect) -> Result { let img = Image::downscale(path, max).await?; let area = Image::pixel_area((img.width(), img.height()), max); let b = Self::encode(img).await?; @@ -25,7 +25,7 @@ impl Sixel { }) } - pub(super) fn image_erase(area: Rect) -> Result<()> { + pub(crate) fn image_erase(area: Rect) -> Result<()> { let s = " ".repeat(area.width as usize); Emulator::move_lock((0, 0), |stderr| { for y in area.top()..area.bottom() { diff --git a/yazi-adapter/src/ueberzug.rs b/yazi-adapter/src/drivers/ueberzug.rs similarity index 93% rename from yazi-adapter/src/ueberzug.rs rename to yazi-adapter/src/drivers/ueberzug.rs index d04b390a1..7620af006 100644 --- a/yazi-adapter/src/ueberzug.rs +++ b/yazi-adapter/src/drivers/ueberzug.rs @@ -13,10 +13,10 @@ type Cmd = Option<(PathBuf, Rect)>; static DEMON: RoCell>> = RoCell::new(); -pub(super) struct Ueberzug; +pub(crate) struct Ueberzug; impl Ueberzug { - pub(super) fn start(adapter: Adapter) { + pub(crate) fn start(adapter: Adapter) { if !adapter.needs_ueberzug() { return DEMON.init(None); } @@ -41,7 +41,7 @@ impl Ueberzug { DEMON.init(Some(tx)) } - pub(super) async fn image_show(path: &Path, max: Rect) -> Result { + pub(crate) async fn image_show(path: &Path, max: Rect) -> Result { let Some(tx) = &*DEMON else { bail!("uninitialized ueberzugpp"); }; @@ -63,7 +63,7 @@ impl Ueberzug { Ok(area) } - pub(super) fn image_erase(_: Rect) -> Result<()> { + pub(crate) fn image_erase(_: Rect) -> Result<()> { if let Some(tx) = &*DEMON { Ok(tx.send(None)?) } else { @@ -74,7 +74,7 @@ impl Ueberzug { // Currently Überzug++'s Wayland output only supports Sway, Hyprland and Wayfire // as it requires information from specific compositor socket directly. // These environment variables are from ueberzugpp src/canvas/wayland/config.cpp - pub(super) fn supported_compositor() -> bool { + pub(crate) fn supported_compositor() -> bool { env_exists("SWAYSOCK") || env_exists("HYPRLAND_INSTANCE_SIGNATURE") || env_exists("WAYFIRE_SOCKET") diff --git a/yazi-adapter/src/emulator.rs b/yazi-adapter/src/emulator.rs index cae2e53ac..d6fca8cae 100644 --- a/yazi-adapter/src/emulator.rs +++ b/yazi-adapter/src/emulator.rs @@ -4,148 +4,62 @@ use anyhow::{Result, bail}; use crossterm::{cursor::{RestorePosition, SavePosition}, execute, style::Print, terminal::{disable_raw_mode, enable_raw_mode}}; use scopeguard::defer; use tokio::{io::{AsyncReadExt, BufReader}, time::timeout}; -use tracing::{error, warn}; -use yazi_shared::env_exists; - -use crate::{Adapter, Mux, TMUX}; - -#[derive(Clone, Debug)] -pub enum Emulator { - Unknown(Vec), - Kitty, - Konsole, - Iterm2, - WezTerm, - Foot, - Ghostty, - Microsoft, - Rio, - BlackBox, - VSCode, - Tabby, - Hyper, - Mintty, - Neovim, - Apple, - Urxvt, +use tracing::{debug, error, warn}; +use yazi_shared::Either; + +use crate::{Adapter, Brand, Mux, TMUX, Unknown}; + +#[derive(Clone, Copy, Debug)] +pub struct Emulator { + pub kind: Either, + pub light: bool, } -impl Emulator { - pub fn adapters(self) -> Vec { - match self { - Self::Unknown(adapters) => adapters, - Self::Kitty => vec![Adapter::Kgp], - Self::Konsole => vec![Adapter::KgpOld], - Self::Iterm2 => vec![Adapter::Iip, Adapter::Sixel], - Self::WezTerm => vec![Adapter::Iip, Adapter::Sixel], - Self::Foot => vec![Adapter::Sixel], - Self::Ghostty => vec![Adapter::Kgp], - Self::Microsoft => vec![Adapter::Sixel], - Self::Rio => vec![Adapter::Iip, Adapter::Sixel], - Self::BlackBox => vec![Adapter::Sixel], - Self::VSCode => vec![Adapter::Iip, Adapter::Sixel], - Self::Tabby => vec![Adapter::Iip, Adapter::Sixel], - Self::Hyper => vec![Adapter::Iip, Adapter::Sixel], - Self::Mintty => vec![Adapter::Iip], - Self::Neovim => vec![], - Self::Apple => vec![], - Self::Urxvt => vec![], - } - } +impl Default for Emulator { + fn default() -> Self { Self { kind: Either::Right(Unknown::default()), light: false } } } impl Emulator { pub fn detect() -> Self { - if env_exists("NVIM_LOG_FILE") && env_exists("NVIM") { - return Self::Neovim; - } - - let vars = [ - ("KITTY_WINDOW_ID", Self::Kitty), - ("KONSOLE_VERSION", Self::Konsole), - ("ITERM_SESSION_ID", Self::Iterm2), - ("WEZTERM_EXECUTABLE", Self::WezTerm), - ("GHOSTTY_RESOURCES_DIR", Self::Ghostty), - ("WT_Session", Self::Microsoft), - ("VSCODE_INJECTION", Self::VSCode), - ("TABBY_CONFIG_DIRECTORY", Self::Tabby), - ]; - match vars.into_iter().find(|(env, _)| env_exists(env)) { - Some((_, emulator)) => return emulator, - None => warn!("[Adapter] No special environment variables detected"), - } - - let (term, program) = Self::via_env(); - match program.as_str() { - "iTerm.app" => return Self::Iterm2, - "WezTerm" => return Self::WezTerm, - "ghostty" => return Self::Ghostty, - "rio" => return Self::Rio, - "BlackBox" => return Self::BlackBox, - "vscode" => return Self::VSCode, - "Tabby" => return Self::Tabby, - "Hyper" => return Self::Hyper, - "mintty" => return Self::Mintty, - "Apple_Terminal" => return Self::Apple, - _ => warn!("[Adapter] Unknown TERM_PROGRAM: {program}"), - } - match term.as_str() { - "xterm-kitty" => return Self::Kitty, - "foot" => return Self::Foot, - "foot-extra" => return Self::Foot, - "xterm-ghostty" => return Self::Ghostty, - "rio" => return Self::Rio, - "rxvt-unicode-256color" => return Self::Urxvt, - _ => warn!("[Adapter] Unknown TERM: {term}"), + if let Some(brand) = Brand::from_env() { + Self { kind: Either::Left(brand), light: Self::detect_base().unwrap_or_default().light } + } else { + Self::detect_full().unwrap_or_default() } - - Self::via_csi().unwrap_or(Self::Unknown(vec![])) } - pub fn via_env() -> (String, String) { - let (term, program) = Mux::term_program(); - ( - term.unwrap_or(std::env::var("TERM").unwrap_or_default()), - program.unwrap_or(std::env::var("TERM_PROGRAM").unwrap_or_default()), - ) - } - - pub fn via_csi() -> Result { + pub fn detect_full() -> Result { defer! { disable_raw_mode().ok(); } enable_raw_mode()?; execute!( LineWriter::new(stderr()), SavePosition, - Print(Mux::csi("\x1b[>q\x1b_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\\x1b[c")), + Print(Mux::csi("\x1b_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\")), // Detect KGP + Print(Mux::csi("\x1b[>q")), // Request terminal version + Print("\x1b]11;?\x07"), // Request background color + Print(Mux::csi("\x1b[0c")), // Request device attributes RestorePosition )?; let resp = futures::executor::block_on(Self::read_until_da1()); - let names = [ - ("kitty", Self::Kitty), - ("Konsole", Self::Konsole), - ("iTerm2", Self::Iterm2), - ("WezTerm", Self::WezTerm), - ("foot", Self::Foot), - ("ghostty", Self::Ghostty), - ]; - - for (name, emulator) in names.iter() { - if resp.contains(name) { - return Ok(emulator.clone()); - } - } + let kind = if let Some(brand) = Brand::from_csi(&resp) { + Either::Left(brand) + } else { + Either::Right(Unknown { + kgp: resp.contains("\x1b_Gi=31;OK"), + sixel: ["?4;", "?4c", ";4;", ";4c"].iter().any(|s| resp.contains(s)), + }) + }; - let mut adapters = Vec::with_capacity(2); - if resp.contains("\x1b_Gi=31;OK") { - adapters.push(Adapter::KgpOld); - } - if ["?4;", "?4c", ";4;", ";4c"].iter().any(|s| resp.contains(s)) { - adapters.push(Adapter::Sixel); - } + Ok(Self { kind, light: Self::light_bg(&resp).unwrap_or_default() }) + } - Ok(Self::Unknown(adapters)) + pub fn adapters(self) -> &'static [Adapter] { + match self.kind { + Either::Left(brand) => brand.adapters(), + Either::Right(unknown) => unknown.adapters(), + } } pub fn move_lock((x, y): (u16, u16), cb: F) -> Result @@ -207,4 +121,35 @@ impl Emulator { } String::from_utf8_lossy(&buf).into_owned() } + + fn detect_base() -> Result { + defer! { disable_raw_mode().ok(); } + enable_raw_mode()?; + + execute!( + LineWriter::new(stderr()), + Print("\x1b]11;?\x07"), // Request background color + Print(Mux::csi("\x1b[0c")), // Request device attributes + )?; + + let resp = futures::executor::block_on(Self::read_until_da1()); + Ok(Self { light: Self::light_bg(&resp).unwrap_or_default(), ..Default::default() }) + } + + fn light_bg(resp: &str) -> Result { + match resp.split_once("]11;rgb:") { + Some((_, s)) if s.len() >= 14 => { + let r = u8::from_str_radix(&s[0..2], 16)? as f32; + let g = u8::from_str_radix(&s[5..7], 16)? as f32; + let b = u8::from_str_radix(&s[10..12], 16)? as f32; + let luma = r * 0.2627 / 256.0 + g * 0.6780 / 256.0 + b * 0.0593 / 256.0; + debug!("Detected background color: {} (luma = {luma:.2})", &s[..14]); + Ok(luma > 0.6) + } + _ => { + warn!("Failed to detect background color: {resp:?}"); + Ok(false) + } + } + } } diff --git a/yazi-adapter/src/lib.rs b/yazi-adapter/src/lib.rs index 3e263e3ed..1b177e54e 100644 --- a/yazi-adapter/src/lib.rs +++ b/yazi-adapter/src/lib.rs @@ -1,12 +1,17 @@ #![allow(clippy::unit_arg)] -yazi_macro::mod_flat!( - adapter chafa dimension emulator iip image info kgp kgp_old mux sixel ueberzug -); +yazi_macro::mod_pub!(drivers); + +yazi_macro::mod_flat!(adapter brand dimension emulator image info mux unknown); use yazi_shared::{RoCell, SyncCell, env_exists, in_wsl}; + +pub static EMULATOR: RoCell = RoCell::new(); pub static ADAPTOR: RoCell = RoCell::new(); +// Image state +static SHOWN: SyncCell> = SyncCell::new(None); + // Tmux support pub static TMUX: RoCell = RoCell::new(); static ESCAPE: RoCell<&'static str> = RoCell::new(); @@ -16,10 +21,7 @@ static CLOSE: RoCell<&'static str> = RoCell::new(); // WSL support pub static WSL: RoCell = RoCell::new(); -// Image state -static SHOWN: SyncCell> = SyncCell::new(None); - -pub fn init() { +pub fn init() -> anyhow::Result<()> { // Tmux support TMUX.init(env_exists("TMUX_PANE") && env_exists("TMUX")); ESCAPE.init(if *TMUX { "\x1b\x1b" } else { "\x1b" }); @@ -38,6 +40,11 @@ pub fn init() { // WSL support WSL.init(in_wsl()); - ADAPTOR.init(Adapter::matches()); + EMULATOR.init(Emulator::detect()); + yazi_config::init_flavor(EMULATOR.light)?; + + ADAPTOR.init(Adapter::matches(*EMULATOR)); ADAPTOR.start(); + + Ok(()) } diff --git a/yazi-adapter/src/unknown.rs b/yazi-adapter/src/unknown.rs new file mode 100644 index 000000000..0a4dd18dc --- /dev/null +++ b/yazi-adapter/src/unknown.rs @@ -0,0 +1,20 @@ +use crate::Adapter; + +#[derive(Debug, Clone, Copy, Default)] +pub struct Unknown { + pub kgp: bool, + pub sixel: bool, +} + +impl Unknown { + pub(super) fn adapters(self) -> &'static [Adapter] { + use Adapter as A; + + match (self.kgp, self.sixel) { + (true, true) => &[A::Kgp, A::Sixel], + (true, false) => &[A::Kgp], + (false, true) => &[A::Sixel], + (false, false) => &[], + } + } +} diff --git a/yazi-boot/src/actions/debug.rs b/yazi-boot/src/actions/debug.rs index 43919262c..ced554edb 100644 --- a/yazi-boot/src/actions/debug.rs +++ b/yazi-boot/src/actions/debug.rs @@ -17,13 +17,14 @@ impl Actions { writeln!(s, "\nYa")?; writeln!(s, " Version: {}", Self::process_output("ya", "--version"))?; + let emulator = yazi_adapter::Emulator::detect(); writeln!(s, "\nEmulator")?; - writeln!(s, " Emulator.via_env: {:?}", yazi_adapter::Emulator::via_env())?; - writeln!(s, " Emulator.via_csi: {:?}", yazi_adapter::Emulator::via_csi())?; - writeln!(s, " Emulator.detect : {:?}", yazi_adapter::Emulator::detect())?; + writeln!(s, " Brand.from_env : {:?}", yazi_adapter::Brand::from_env())?; + writeln!(s, " Emulator.detect : {:?}", emulator)?; + writeln!(s, " Emulator.detect_full: {:?}", yazi_adapter::Emulator::detect_full())?; writeln!(s, "\nAdapter")?; - writeln!(s, " Adapter.matches: {:?}", yazi_adapter::Adapter::matches())?; + writeln!(s, " Adapter.matches: {:?}", yazi_adapter::Adapter::matches(emulator))?; writeln!(s, "\nDesktop")?; writeln!(s, " XDG_SESSION_TYPE : {:?}", env::var_os("XDG_SESSION_TYPE"))?; diff --git a/yazi-config/preset/theme+dark.toml b/yazi-config/preset/theme+dark.toml new file mode 100644 index 000000000..45f3d20c9 --- /dev/null +++ b/yazi-config/preset/theme+dark.toml @@ -0,0 +1,649 @@ +# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. +# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. +"$schema" = "https://yazi-rs.github.io/schemas/theme.json" + +# vim:fileencoding=utf-8:foldmethod=marker + +# : Icons {{{ + +[icon] + +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 = "#cbcb41" }, + { name = ".bash_profile", text = "", fg = "#89e051" }, + { name = ".bashrc", text = "", fg = "#89e051" }, + { name = ".dockerignore", text = "󰡨", fg = "#458ee6" }, + { name = ".ds_store", text = "", fg = "#41535b" }, + { name = ".editorconfig", text = "", fg = "#fff2f2" }, + { name = ".env", text = "", fg = "#faf743" }, + { name = ".eslintignore", text = "", fg = "#4b32c3" }, + { name = ".eslintrc", text = "", fg = "#4b32c3" }, + { name = ".git-blame-ignore-revs", text = "", fg = "#f54d27" }, + { name = ".gitattributes", text = "", fg = "#f54d27" }, + { name = ".gitconfig", text = "", fg = "#f54d27" }, + { name = ".gitignore", text = "", fg = "#f54d27" }, + { name = ".gitlab-ci.yml", text = "", fg = "#e24329" }, + { name = ".gitmodules", text = "", fg = "#f54d27" }, + { name = ".gtkrc-2.0", text = "", fg = "#ffffff" }, + { name = ".gvimrc", text = "", fg = "#019833" }, + { name = ".justfile", text = "", fg = "#6d8086" }, + { name = ".luaurc", text = "", fg = "#00a2ff" }, + { name = ".mailmap", text = "󰊢", fg = "#f54d27" }, + { name = ".npmignore", text = "", fg = "#e8274b" }, + { name = ".npmrc", text = "", fg = "#e8274b" }, + { name = ".nuxtrc", text = "󱄆", fg = "#00c58e" }, + { name = ".nvmrc", text = "", fg = "#5fa04e" }, + { name = ".prettierignore", text = "", fg = "#4285f4" }, + { name = ".prettierrc", text = "", fg = "#4285f4" }, + { name = ".prettierrc.cjs", text = "", fg = "#4285f4" }, + { name = ".prettierrc.js", text = "", fg = "#4285f4" }, + { name = ".prettierrc.json", text = "", fg = "#4285f4" }, + { name = ".prettierrc.json5", text = "", fg = "#4285f4" }, + { name = ".prettierrc.mjs", text = "", fg = "#4285f4" }, + { name = ".prettierrc.toml", text = "", fg = "#4285f4" }, + { name = ".prettierrc.yaml", text = "", fg = "#4285f4" }, + { name = ".prettierrc.yml", text = "", fg = "#4285f4" }, + { name = ".settings.json", text = "", fg = "#854cc7" }, + { name = ".SRCINFO", text = "󰣇", fg = "#0f94d2" }, + { name = ".vimrc", text = "", fg = "#019833" }, + { name = ".Xauthority", text = "", fg = "#e54d18" }, + { name = ".xinitrc", text = "", fg = "#e54d18" }, + { name = ".Xresources", text = "", fg = "#e54d18" }, + { name = ".xsession", text = "", fg = "#e54d18" }, + { name = ".zprofile", text = "", fg = "#89e051" }, + { name = ".zshenv", text = "", fg = "#89e051" }, + { name = ".zshrc", text = "", fg = "#89e051" }, + { name = "_gvimrc", text = "", fg = "#019833" }, + { name = "_vimrc", text = "", fg = "#019833" }, + { name = "avif", text = "", fg = "#a074c4" }, + { name = "brewfile", text = "", fg = "#701516" }, + { name = "bspwmrc", text = "", fg = "#2f2f2f" }, + { name = "build", text = "", fg = "#89e051" }, + { name = "build.gradle", text = "", fg = "#005f87" }, + { name = "build.zig.zon", text = "", fg = "#f69a1b" }, + { name = "cantorrc", text = "", fg = "#1c99f3" }, + { name = "checkhealth", text = "󰓙", fg = "#75b4fb" }, + { name = "cmakelists.txt", text = "", fg = "#6d8086" }, + { name = "code_of_conduct", text = "", fg = "#e41662" }, + { name = "code_of_conduct.md", text = "", fg = "#e41662" }, + { name = "commit_editmsg", text = "", fg = "#f54d27" }, + { name = "commitlint.config.js", text = "󰜘", fg = "#2b9689" }, + { name = "commitlint.config.ts", text = "󰜘", fg = "#2b9689" }, + { name = "compose.yaml", text = "󰡨", fg = "#458ee6" }, + { name = "compose.yml", text = "󰡨", fg = "#458ee6" }, + { name = "config", text = "", fg = "#6d8086" }, + { name = "containerfile", text = "󰡨", fg = "#458ee6" }, + { name = "copying", text = "", fg = "#cbcb41" }, + { name = "copying.lesser", text = "", fg = "#cbcb41" }, + { name = "docker-compose.yaml", text = "󰡨", fg = "#458ee6" }, + { name = "docker-compose.yml", text = "󰡨", fg = "#458ee6" }, + { name = "dockerfile", text = "󰡨", fg = "#458ee6" }, + { name = "eslint.config.cjs", text = "", fg = "#4b32c3" }, + { name = "eslint.config.js", text = "", fg = "#4b32c3" }, + { name = "eslint.config.mjs", text = "", fg = "#4b32c3" }, + { name = "eslint.config.ts", text = "", fg = "#4b32c3" }, + { name = "ext_typoscript_setup.txt", text = "", fg = "#ff8700" }, + { name = "favicon.ico", text = "", fg = "#cbcb41" }, + { name = "fp-info-cache", text = "", fg = "#ffffff" }, + { name = "fp-lib-table", text = "", fg = "#ffffff" }, + { name = "FreeCAD.conf", text = "", fg = "#cb333b" }, + { name = "gemfile$", text = "", fg = "#701516" }, + { name = "gnumakefile", text = "", fg = "#6d8086" }, + { name = "go.mod", text = "", fg = "#519aba" }, + { name = "go.sum", text = "", fg = "#519aba" }, + { name = "go.work", text = "", fg = "#519aba" }, + { name = "gradle-wrapper.properties", text = "", fg = "#005f87" }, + { name = "gradle.properties", text = "", fg = "#005f87" }, + { name = "gradlew", text = "", fg = "#005f87" }, + { name = "groovy", text = "", fg = "#4a687c" }, + { name = "gruntfile.babel.js", text = "", fg = "#e37933" }, + { name = "gruntfile.coffee", text = "", fg = "#e37933" }, + { name = "gruntfile.js", text = "", fg = "#e37933" }, + { name = "gruntfile.ts", text = "", fg = "#e37933" }, + { name = "gtkrc", text = "", fg = "#ffffff" }, + { name = "gulpfile.babel.js", text = "", fg = "#cc3e44" }, + { name = "gulpfile.coffee", text = "", fg = "#cc3e44" }, + { name = "gulpfile.js", text = "", fg = "#cc3e44" }, + { name = "gulpfile.ts", text = "", fg = "#cc3e44" }, + { name = "hypridle.conf", text = "", fg = "#00aaae" }, + { name = "hyprland.conf", text = "", fg = "#00aaae" }, + { name = "hyprlock.conf", text = "", fg = "#00aaae" }, + { name = "hyprpaper.conf", text = "", fg = "#00aaae" }, + { name = "i18n.config.js", text = "󰗊", fg = "#7986cb" }, + { name = "i18n.config.ts", text = "󰗊", fg = "#7986cb" }, + { name = "i3blocks.conf", text = "", fg = "#e8ebee" }, + { name = "i3status.conf", text = "", fg = "#e8ebee" }, + { name = "ionic.config.json", text = "", fg = "#4f8ff7" }, + { name = "justfile", text = "", fg = "#6d8086" }, + { name = "kalgebrarc", text = "", fg = "#1c99f3" }, + { name = "kdeglobals", text = "", fg = "#1c99f3" }, + { name = "kdenlive-layoutsrc", text = "", fg = "#83b8f2" }, + { name = "kdenliverc", text = "", fg = "#83b8f2" }, + { name = "kritadisplayrc", text = "", fg = "#f245fb" }, + { name = "kritarc", text = "", fg = "#f245fb" }, + { name = "license", text = "", fg = "#d0bf41" }, + { name = "license.md", text = "", fg = "#d0bf41" }, + { name = "lxde-rc.xml", text = "", fg = "#909090" }, + { name = "lxqt.conf", text = "", fg = "#0192d3" }, + { name = "makefile", text = "", fg = "#6d8086" }, + { name = "mix.lock", text = "", fg = "#a074c4" }, + { name = "mpv.conf", text = "", fg = "#3b1342" }, + { name = "node_modules", text = "", fg = "#e8274b" }, + { name = "nuxt.config.cjs", text = "󱄆", fg = "#00c58e" }, + { name = "nuxt.config.js", text = "󱄆", fg = "#00c58e" }, + { name = "nuxt.config.mjs", text = "󱄆", fg = "#00c58e" }, + { name = "nuxt.config.ts", text = "󱄆", fg = "#00c58e" }, + { name = "package-lock.json", text = "", fg = "#7a0d21" }, + { name = "package.json", text = "", fg = "#e8274b" }, + { name = "PKGBUILD", text = "", fg = "#0f94d2" }, + { name = "platformio.ini", text = "", fg = "#f6822b" }, + { name = "pom.xml", text = "", fg = "#7a0d21" }, + { name = "prettier.config.cjs", text = "", fg = "#4285f4" }, + { name = "prettier.config.js", text = "", fg = "#4285f4" }, + { name = "prettier.config.mjs", text = "", fg = "#4285f4" }, + { name = "prettier.config.ts", text = "", fg = "#4285f4" }, + { name = "procfile", text = "", fg = "#a074c4" }, + { name = "PrusaSlicer.ini", text = "", fg = "#ec6b23" }, + { name = "PrusaSlicerGcodeViewer.ini", text = "", fg = "#ec6b23" }, + { name = "py.typed", text = "", fg = "#ffbc03" }, + { name = "QtProject.conf", text = "", fg = "#40cd52" }, + { name = "rakefile", text = "", fg = "#701516" }, + { name = "rmd", text = "", fg = "#519aba" }, + { name = "robots.txt", text = "󰚩", fg = "#5d7096" }, + { name = "security", text = "󰒃", fg = "#bec4c9" }, + { name = "security.md", text = "󰒃", fg = "#bec4c9" }, + { name = "settings.gradle", text = "", fg = "#005f87" }, + { name = "svelte.config.js", text = "", fg = "#ff3e00" }, + { name = "sxhkdrc", text = "", fg = "#2f2f2f" }, + { name = "sym-lib-table", text = "", fg = "#ffffff" }, + { name = "tailwind.config.js", text = "󱏿", fg = "#20c2e3" }, + { name = "tailwind.config.mjs", text = "󱏿", fg = "#20c2e3" }, + { name = "tailwind.config.ts", text = "󱏿", fg = "#20c2e3" }, + { name = "tmux.conf", text = "", fg = "#14ba19" }, + { name = "tmux.conf.local", text = "", fg = "#14ba19" }, + { name = "tsconfig.json", text = "", fg = "#519aba" }, + { name = "unlicense", text = "", fg = "#d0bf41" }, + { name = "vagrantfile$", text = "", fg = "#1563ff" }, + { name = "vercel.json", text = "▲", fg = "#ffffff" }, + { name = "vlcrc", text = "󰕼", fg = "#ee7a00" }, + { name = "webpack", text = "󰜫", fg = "#519aba" }, + { name = "weston.ini", text = "", fg = "#ffbb01" }, + { name = "workspace", text = "", fg = "#89e051" }, + { name = "xmobarrc", text = "", fg = "#fd4d5d" }, + { name = "xmobarrc.hs", text = "", fg = "#fd4d5d" }, + { name = "xmonad.hs", text = "", fg = "#fd4d5d" }, + { name = "xorg.conf", text = "", fg = "#e54d18" }, + { name = "xsettingsd.conf", text = "", fg = "#e54d18" }, +] +exts = [ + { name = "3gp", text = "", fg = "#fd971f" }, + { name = "3mf", text = "󰆧", fg = "#888888" }, + { name = "7z", text = "", fg = "#eca517" }, + { name = "a", text = "", fg = "#dcddd6" }, + { name = "aac", text = "", fg = "#00afff" }, + { name = "ai", text = "", fg = "#cbcb41" }, + { name = "aif", text = "", fg = "#00afff" }, + { name = "aiff", text = "", fg = "#00afff" }, + { name = "android", text = "", fg = "#34a853" }, + { name = "ape", text = "", fg = "#00afff" }, + { name = "apk", text = "", fg = "#34a853" }, + { name = "apl", text = "⍝", fg = "#ffa500" }, + { name = "app", text = "", fg = "#9f0500" }, + { name = "applescript", text = "", fg = "#6d8085" }, + { name = "asc", text = "󰦝", fg = "#576d7f" }, + { name = "ass", text = "󰨖", fg = "#ffb713" }, + { name = "astro", text = "", fg = "#e23f67" }, + { name = "awk", text = "", fg = "#4d5a5e" }, + { name = "azcli", text = "", fg = "#0078d4" }, + { name = "bak", text = "󰁯", fg = "#6d8086" }, + { name = "bash", text = "", fg = "#89e051" }, + { name = "bat", text = "", fg = "#c1f12e" }, + { name = "bazel", text = "", fg = "#89e051" }, + { name = "bib", text = "󱉟", fg = "#cbcb41" }, + { name = "bicep", text = "", fg = "#519aba" }, + { name = "bicepparam", text = "", fg = "#9f74b3" }, + { name = "bin", text = "", fg = "#9f0500" }, + { name = "blade.php", text = "", fg = "#f05340" }, + { name = "blend", text = "󰂫", fg = "#ea7600" }, + { name = "blp", text = "󰺾", fg = "#5796e2" }, + { name = "bmp", text = "", fg = "#a074c4" }, + { name = "bqn", text = "⎉", fg = "#2b7067" }, + { name = "brep", text = "󰻫", fg = "#839463" }, + { name = "bz", text = "", fg = "#eca517" }, + { name = "bz2", text = "", fg = "#eca517" }, + { name = "bz3", text = "", fg = "#eca517" }, + { name = "bzl", text = "", fg = "#89e051" }, + { name = "c", text = "", fg = "#599eff" }, + { name = "c++", text = "", fg = "#f34b7d" }, + { name = "cache", text = "", fg = "#ffffff" }, + { name = "cast", text = "", fg = "#fd971f" }, + { name = "cbl", text = "⚙", fg = "#005ca5" }, + { name = "cc", text = "", fg = "#f34b7d" }, + { name = "ccm", text = "", fg = "#f34b7d" }, + { name = "cfg", text = "", fg = "#6d8086" }, + { name = "cjs", text = "", fg = "#cbcb41" }, + { name = "clj", text = "", fg = "#8dc149" }, + { name = "cljc", text = "", fg = "#8dc149" }, + { name = "cljd", text = "", fg = "#519aba" }, + { name = "cljs", text = "", fg = "#519aba" }, + { name = "cmake", text = "", fg = "#6d8086" }, + { name = "cob", text = "⚙", fg = "#005ca5" }, + { name = "cobol", text = "⚙", fg = "#005ca5" }, + { name = "coffee", text = "", fg = "#cbcb41" }, + { name = "conf", text = "", fg = "#6d8086" }, + { name = "config.ru", text = "", fg = "#701516" }, + { name = "cow", text = "󰆚", fg = "#965824" }, + { name = "cp", text = "", fg = "#519aba" }, + { name = "cpp", text = "", fg = "#519aba" }, + { name = "cppm", text = "", fg = "#519aba" }, + { name = "cpy", text = "⚙", fg = "#005ca5" }, + { name = "cr", text = "", fg = "#c8c8c8" }, + { name = "crdownload", text = "", fg = "#44cda8" }, + { name = "cs", text = "󰌛", fg = "#596706" }, + { name = "csh", text = "", fg = "#4d5a5e" }, + { name = "cshtml", text = "󱦗", fg = "#512bd4" }, + { name = "cson", text = "", fg = "#cbcb41" }, + { name = "csproj", text = "󰪮", fg = "#512bd4" }, + { name = "css", text = "", fg = "#42a5f5" }, + { name = "csv", text = "", fg = "#89e051" }, + { name = "cts", text = "", fg = "#519aba" }, + { name = "cu", text = "", fg = "#89e051" }, + { name = "cue", text = "󰲹", fg = "#ed95ae" }, + { name = "cuh", text = "", fg = "#a074c4" }, + { name = "cxx", text = "", fg = "#519aba" }, + { name = "cxxm", text = "", fg = "#519aba" }, + { name = "d", text = "", fg = "#427819" }, + { name = "d.ts", text = "", fg = "#d59855" }, + { name = "dart", text = "", fg = "#03589c" }, + { name = "db", text = "", fg = "#dad8d8" }, + { name = "dconf", text = "", fg = "#ffffff" }, + { name = "desktop", text = "", fg = "#563d7c" }, + { name = "diff", text = "", fg = "#41535b" }, + { name = "dll", text = "", fg = "#4d2c0b" }, + { name = "doc", text = "󰈬", fg = "#185abd" }, + { name = "Dockerfile", text = "󰡨", fg = "#458ee6" }, + { name = "docx", text = "󰈬", fg = "#185abd" }, + { name = "dot", text = "󱁉", fg = "#30638e" }, + { name = "download", text = "", fg = "#44cda8" }, + { name = "drl", text = "", fg = "#ffafaf" }, + { name = "dropbox", text = "", fg = "#0061fe" }, + { name = "dump", text = "", fg = "#dad8d8" }, + { name = "dwg", text = "󰻫", fg = "#839463" }, + { name = "dxf", text = "󰻫", fg = "#839463" }, + { name = "ebook", text = "", fg = "#eab16d" }, + { name = "ebuild", text = "", fg = "#4c416e" }, + { name = "edn", text = "", fg = "#519aba" }, + { name = "eex", text = "", fg = "#a074c4" }, + { name = "ejs", text = "", fg = "#cbcb41" }, + { name = "el", text = "", fg = "#8172be" }, + { name = "elc", text = "", fg = "#8172be" }, + { name = "elf", text = "", fg = "#9f0500" }, + { name = "elm", text = "", fg = "#519aba" }, + { name = "eln", text = "", fg = "#8172be" }, + { name = "env", text = "", fg = "#faf743" }, + { name = "eot", text = "", fg = "#ececec" }, + { name = "epp", text = "", fg = "#ffa61a" }, + { name = "epub", text = "", fg = "#eab16d" }, + { name = "erb", text = "", fg = "#701516" }, + { name = "erl", text = "", fg = "#b83998" }, + { name = "ex", text = "", fg = "#a074c4" }, + { name = "exe", text = "", fg = "#9f0500" }, + { name = "exs", text = "", fg = "#a074c4" }, + { name = "f#", text = "", fg = "#519aba" }, + { name = "f3d", text = "󰻫", fg = "#839463" }, + { name = "f90", text = "󱈚", fg = "#734f96" }, + { name = "fbx", text = "󰆧", fg = "#888888" }, + { name = "fcbak", text = "", fg = "#cb333b" }, + { name = "fcmacro", text = "", fg = "#cb333b" }, + { name = "fcmat", text = "", fg = "#cb333b" }, + { name = "fcparam", text = "", fg = "#cb333b" }, + { name = "fcscript", text = "", fg = "#cb333b" }, + { name = "fcstd", text = "", fg = "#cb333b" }, + { name = "fcstd1", text = "", fg = "#cb333b" }, + { name = "fctb", text = "", fg = "#cb333b" }, + { name = "fctl", text = "", fg = "#cb333b" }, + { name = "fdmdownload", text = "", fg = "#44cda8" }, + { name = "fish", text = "", fg = "#4d5a5e" }, + { name = "flac", text = "", fg = "#0075aa" }, + { name = "flc", text = "", fg = "#ececec" }, + { name = "flf", text = "", fg = "#ececec" }, + { name = "fnl", text = "", fg = "#fff3d7" }, + { name = "fs", text = "", fg = "#519aba" }, + { name = "fsi", text = "", fg = "#519aba" }, + { name = "fsscript", text = "", fg = "#519aba" }, + { name = "fsx", text = "", fg = "#519aba" }, + { name = "gcode", text = "󰐫", fg = "#1471ad" }, + { name = "gd", text = "", fg = "#6d8086" }, + { name = "gemspec", text = "", fg = "#701516" }, + { name = "gif", text = "", fg = "#a074c4" }, + { name = "git", text = "", fg = "#f14c28" }, + { name = "glb", text = "", fg = "#ffb13b" }, + { name = "gleam", text = "", fg = "#ffaff3" }, + { name = "gnumakefile", text = "", fg = "#6d8086" }, + { name = "go", text = "", fg = "#519aba" }, + { name = "godot", text = "", fg = "#6d8086" }, + { name = "gql", text = "", fg = "#e535ab" }, + { name = "gradle", text = "", fg = "#005f87" }, + { name = "graphql", text = "", fg = "#e535ab" }, + { name = "gresource", text = "", fg = "#ffffff" }, + { name = "gv", text = "󱁉", fg = "#30638e" }, + { name = "gz", text = "", fg = "#eca517" }, + { name = "h", text = "", fg = "#a074c4" }, + { name = "haml", text = "", fg = "#eaeae1" }, + { name = "hbs", text = "", fg = "#f0772b" }, + { name = "heex", text = "", fg = "#a074c4" }, + { name = "hex", text = "", fg = "#2e63ff" }, + { name = "hh", text = "", fg = "#a074c4" }, + { name = "hpp", text = "", fg = "#a074c4" }, + { name = "hrl", text = "", fg = "#b83998" }, + { name = "hs", text = "", fg = "#a074c4" }, + { name = "htm", text = "", fg = "#e34c26" }, + { name = "html", text = "", fg = "#e44d26" }, + { name = "http", text = "", fg = "#008ec7" }, + { name = "huff", text = "󰡘", fg = "#4242c7" }, + { name = "hurl", text = "", fg = "#ff0288" }, + { name = "hx", text = "", fg = "#ea8220" }, + { name = "hxx", text = "", fg = "#a074c4" }, + { name = "ical", text = "", fg = "#2b2e83" }, + { name = "icalendar", text = "", fg = "#2b2e83" }, + { name = "ico", text = "", fg = "#cbcb41" }, + { name = "ics", text = "", fg = "#2b2e83" }, + { name = "ifb", text = "", fg = "#2b2e83" }, + { name = "ifc", text = "󰻫", fg = "#839463" }, + { name = "ige", text = "󰻫", fg = "#839463" }, + { name = "iges", text = "󰻫", fg = "#839463" }, + { name = "igs", text = "󰻫", fg = "#839463" }, + { name = "image", text = "", fg = "#d0bec8" }, + { name = "img", text = "", fg = "#d0bec8" }, + { name = "import", text = "", fg = "#ececec" }, + { name = "info", text = "", fg = "#ffffcd" }, + { name = "ini", text = "", fg = "#6d8086" }, + { name = "ino", text = "", fg = "#56b6c2" }, + { name = "ipynb", text = "", fg = "#51a0cf" }, + { name = "iso", text = "", fg = "#d0bec8" }, + { name = "ixx", text = "", fg = "#519aba" }, + { name = "java", text = "", fg = "#cc3e44" }, + { name = "jl", text = "", fg = "#a270ba" }, + { name = "jpeg", text = "", fg = "#a074c4" }, + { name = "jpg", text = "", fg = "#a074c4" }, + { name = "js", text = "", fg = "#cbcb41" }, + { name = "json", text = "", fg = "#cbcb41" }, + { name = "json5", text = "", fg = "#cbcb41" }, + { name = "jsonc", text = "", fg = "#cbcb41" }, + { name = "jsx", text = "", fg = "#20c2e3" }, + { name = "jwmrc", text = "", fg = "#0078cd" }, + { name = "jxl", text = "", fg = "#a074c4" }, + { name = "kbx", text = "󰯄", fg = "#737672" }, + { name = "kdb", text = "", fg = "#529b34" }, + { name = "kdbx", text = "", fg = "#529b34" }, + { name = "kdenlive", text = "", fg = "#83b8f2" }, + { name = "kdenlivetitle", text = "", fg = "#83b8f2" }, + { name = "kicad_dru", text = "", fg = "#ffffff" }, + { name = "kicad_mod", text = "", fg = "#ffffff" }, + { name = "kicad_pcb", text = "", fg = "#ffffff" }, + { name = "kicad_prl", text = "", fg = "#ffffff" }, + { name = "kicad_pro", text = "", fg = "#ffffff" }, + { name = "kicad_sch", text = "", fg = "#ffffff" }, + { name = "kicad_sym", text = "", fg = "#ffffff" }, + { name = "kicad_wks", text = "", fg = "#ffffff" }, + { name = "ko", text = "", fg = "#dcddd6" }, + { name = "kpp", text = "", fg = "#f245fb" }, + { name = "kra", text = "", fg = "#f245fb" }, + { name = "krz", text = "", fg = "#f245fb" }, + { name = "ksh", text = "", fg = "#4d5a5e" }, + { name = "kt", text = "", fg = "#7f52ff" }, + { name = "kts", text = "", fg = "#7f52ff" }, + { name = "lck", text = "", fg = "#bbbbbb" }, + { name = "leex", text = "", fg = "#a074c4" }, + { name = "less", text = "", fg = "#563d7c" }, + { name = "lff", text = "", fg = "#ececec" }, + { name = "lhs", text = "", fg = "#a074c4" }, + { name = "lib", text = "", fg = "#4d2c0b" }, + { name = "license", text = "", fg = "#cbcb41" }, + { name = "liquid", text = "", fg = "#95bf47" }, + { name = "lock", text = "", fg = "#bbbbbb" }, + { name = "log", text = "󰌱", fg = "#dddddd" }, + { name = "lrc", text = "󰨖", fg = "#ffb713" }, + { name = "lua", text = "", fg = "#51a0cf" }, + { name = "luac", text = "", fg = "#51a0cf" }, + { name = "luau", text = "", fg = "#00a2ff" }, + { name = "m", text = "", fg = "#599eff" }, + { name = "m3u", text = "󰲹", fg = "#ed95ae" }, + { name = "m3u8", text = "󰲹", fg = "#ed95ae" }, + { name = "m4a", text = "", fg = "#00afff" }, + { name = "m4v", text = "", fg = "#fd971f" }, + { name = "magnet", text = "", fg = "#a51b16" }, + { name = "makefile", text = "", fg = "#6d8086" }, + { name = "markdown", text = "", fg = "#dddddd" }, + { name = "material", text = "󰔉", fg = "#b83998" }, + { name = "md", text = "", fg = "#dddddd" }, + { name = "md5", text = "󰕥", fg = "#8c86af" }, + { name = "mdx", text = "", fg = "#519aba" }, + { name = "mint", text = "󰌪", fg = "#87c095" }, + { name = "mjs", text = "", fg = "#f1e05a" }, + { name = "mk", text = "", fg = "#6d8086" }, + { name = "mkv", text = "", fg = "#fd971f" }, + { name = "ml", text = "", fg = "#e37933" }, + { name = "mli", text = "", fg = "#e37933" }, + { name = "mm", text = "", fg = "#519aba" }, + { name = "mo", text = "∞", fg = "#9772fb" }, + { name = "mobi", text = "", fg = "#eab16d" }, + { name = "mojo", text = "", fg = "#ff4c1f" }, + { name = "mov", text = "", fg = "#fd971f" }, + { name = "mp3", text = "", fg = "#00afff" }, + { name = "mp4", text = "", fg = "#fd971f" }, + { name = "mpp", text = "", fg = "#519aba" }, + { name = "msf", text = "", fg = "#137be1" }, + { name = "mts", text = "", fg = "#519aba" }, + { name = "mustache", text = "", fg = "#e37933" }, + { name = "nfo", text = "", fg = "#ffffcd" }, + { name = "nim", text = "", fg = "#f3d400" }, + { name = "nix", text = "", fg = "#7ebae4" }, + { name = "nswag", text = "", fg = "#85ea2d" }, + { name = "nu", text = ">", fg = "#3aa675" }, + { name = "o", text = "", fg = "#9f0500" }, + { name = "obj", text = "󰆧", fg = "#888888" }, + { name = "ogg", text = "", fg = "#0075aa" }, + { name = "opus", text = "", fg = "#0075aa" }, + { name = "org", text = "", fg = "#77aa99" }, + { name = "otf", text = "", fg = "#ececec" }, + { name = "out", text = "", fg = "#9f0500" }, + { name = "part", text = "", fg = "#44cda8" }, + { name = "patch", text = "", fg = "#41535b" }, + { name = "pck", text = "", fg = "#6d8086" }, + { name = "pcm", text = "", fg = "#0075aa" }, + { name = "pdf", text = "", fg = "#b30b00" }, + { name = "php", text = "", fg = "#a074c4" }, + { name = "pl", text = "", fg = "#519aba" }, + { name = "pls", text = "󰲹", fg = "#ed95ae" }, + { name = "ply", text = "󰆧", fg = "#888888" }, + { name = "pm", text = "", fg = "#519aba" }, + { name = "png", text = "", fg = "#a074c4" }, + { name = "po", text = "", fg = "#2596be" }, + { name = "pot", text = "", fg = "#2596be" }, + { name = "pp", text = "", fg = "#ffa61a" }, + { name = "ppt", text = "󰈧", fg = "#cb4a32" }, + { name = "prisma", text = "", fg = "#5a67d8" }, + { name = "pro", text = "", fg = "#e4b854" }, + { name = "ps1", text = "󰨊", fg = "#4273ca" }, + { name = "psb", text = "", fg = "#519aba" }, + { name = "psd", text = "", fg = "#519aba" }, + { name = "psd1", text = "󰨊", fg = "#6975c4" }, + { name = "psm1", text = "󰨊", fg = "#6975c4" }, + { name = "pub", text = "󰷖", fg = "#e3c58e" }, + { name = "pxd", text = "", fg = "#5aa7e4" }, + { name = "pxi", text = "", fg = "#5aa7e4" }, + { name = "py", text = "", fg = "#ffbc03" }, + { name = "pyc", text = "", fg = "#ffe291" }, + { name = "pyd", text = "", fg = "#ffe291" }, + { name = "pyi", text = "", fg = "#ffbc03" }, + { name = "pyo", text = "", fg = "#ffe291" }, + { name = "pyw", text = "", fg = "#5aa7e4" }, + { name = "pyx", text = "", fg = "#5aa7e4" }, + { name = "qm", text = "", fg = "#2596be" }, + { name = "qml", text = "", fg = "#40cd52" }, + { name = "qrc", text = "", fg = "#40cd52" }, + { name = "qss", text = "", fg = "#40cd52" }, + { name = "query", text = "", fg = "#90a850" }, + { name = "R", text = "󰟔", fg = "#2266ba" }, + { name = "r", text = "󰟔", fg = "#2266ba" }, + { name = "rake", text = "", fg = "#701516" }, + { name = "rar", text = "", fg = "#eca517" }, + { name = "razor", text = "󱦘", fg = "#512bd4" }, + { name = "rb", text = "", fg = "#701516" }, + { name = "res", text = "", fg = "#cc3e44" }, + { name = "resi", text = "", fg = "#f55385" }, + { name = "rlib", text = "", fg = "#dea584" }, + { name = "rmd", text = "", fg = "#519aba" }, + { name = "rproj", text = "󰗆", fg = "#358a5b" }, + { name = "rs", text = "", fg = "#dea584" }, + { name = "rss", text = "", fg = "#fb9d3b" }, + { name = "sass", text = "", fg = "#f55385" }, + { name = "sbt", text = "", fg = "#cc3e44" }, + { name = "sc", text = "", fg = "#cc3e44" }, + { name = "scad", text = "", fg = "#f9d72c" }, + { name = "scala", text = "", fg = "#cc3e44" }, + { name = "scm", text = "󰘧", fg = "#eeeeee" }, + { name = "scss", text = "", fg = "#f55385" }, + { name = "sh", text = "", fg = "#4d5a5e" }, + { name = "sha1", text = "󰕥", fg = "#8c86af" }, + { name = "sha224", text = "󰕥", fg = "#8c86af" }, + { name = "sha256", text = "󰕥", fg = "#8c86af" }, + { name = "sha384", text = "󰕥", fg = "#8c86af" }, + { name = "sha512", text = "󰕥", fg = "#8c86af" }, + { name = "sig", text = "λ", fg = "#e37933" }, + { name = "signature", text = "λ", fg = "#e37933" }, + { name = "skp", text = "󰻫", fg = "#839463" }, + { name = "sldasm", text = "󰻫", fg = "#839463" }, + { name = "sldprt", text = "󰻫", fg = "#839463" }, + { name = "slim", text = "", fg = "#e34c26" }, + { name = "sln", text = "", fg = "#854cc7" }, + { name = "slvs", text = "󰻫", fg = "#839463" }, + { name = "sml", text = "λ", fg = "#e37933" }, + { name = "so", text = "", fg = "#dcddd6" }, + { name = "sol", text = "", fg = "#519aba" }, + { name = "spec.js", text = "", fg = "#cbcb41" }, + { name = "spec.jsx", text = "", fg = "#20c2e3" }, + { name = "spec.ts", text = "", fg = "#519aba" }, + { name = "spec.tsx", text = "", fg = "#1354bf" }, + { name = "sql", text = "", fg = "#dad8d8" }, + { name = "sqlite", text = "", fg = "#dad8d8" }, + { name = "sqlite3", text = "", fg = "#dad8d8" }, + { name = "srt", text = "󰨖", fg = "#ffb713" }, + { name = "ssa", text = "󰨖", fg = "#ffb713" }, + { name = "ste", text = "󰻫", fg = "#839463" }, + { name = "step", text = "󰻫", fg = "#839463" }, + { name = "stl", text = "󰆧", fg = "#888888" }, + { name = "stp", text = "󰻫", fg = "#839463" }, + { name = "strings", text = "", fg = "#2596be" }, + { name = "styl", text = "", fg = "#8dc149" }, + { name = "sub", text = "󰨖", fg = "#ffb713" }, + { name = "sublime", text = "", fg = "#e37933" }, + { name = "suo", text = "", fg = "#854cc7" }, + { name = "sv", text = "󰍛", fg = "#019833" }, + { name = "svelte", text = "", fg = "#ff3e00" }, + { name = "svg", text = "󰜡", fg = "#ffb13b" }, + { name = "svh", text = "󰍛", fg = "#019833" }, + { name = "swift", text = "", fg = "#e37933" }, + { name = "t", text = "", fg = "#519aba" }, + { name = "tbc", text = "󰛓", fg = "#1e5cb3" }, + { name = "tcl", text = "󰛓", fg = "#1e5cb3" }, + { name = "templ", text = "", fg = "#dbbd30" }, + { name = "terminal", text = "", fg = "#31b53e" }, + { name = "test.js", text = "", fg = "#cbcb41" }, + { name = "test.jsx", text = "", fg = "#20c2e3" }, + { name = "test.ts", text = "", fg = "#519aba" }, + { name = "test.tsx", text = "", fg = "#1354bf" }, + { name = "tex", text = "", fg = "#3d6117" }, + { name = "tf", text = "", fg = "#5f43e9" }, + { name = "tfvars", text = "", fg = "#5f43e9" }, + { name = "tgz", text = "", fg = "#eca517" }, + { name = "tmux", text = "", fg = "#14ba19" }, + { name = "toml", text = "", fg = "#9c4221" }, + { name = "torrent", text = "", fg = "#44cda8" }, + { name = "tres", text = "", fg = "#6d8086" }, + { name = "ts", text = "", fg = "#519aba" }, + { name = "tscn", text = "", fg = "#6d8086" }, + { name = "tsconfig", text = "", fg = "#ff8700" }, + { name = "tsx", text = "", fg = "#1354bf" }, + { name = "ttf", text = "", fg = "#ececec" }, + { name = "twig", text = "", fg = "#8dc149" }, + { name = "txt", text = "󰈙", fg = "#89e051" }, + { name = "txz", text = "", fg = "#eca517" }, + { name = "typoscript", text = "", fg = "#ff8700" }, + { name = "ui", text = "", fg = "#015bf0" }, + { name = "v", text = "󰍛", fg = "#019833" }, + { name = "vala", text = "", fg = "#7239b3" }, + { name = "vh", text = "󰍛", fg = "#019833" }, + { name = "vhd", text = "󰍛", fg = "#019833" }, + { name = "vhdl", text = "󰍛", fg = "#019833" }, + { name = "vim", text = "", fg = "#019833" }, + { name = "vsh", text = "", fg = "#5d87bf" }, + { name = "vsix", text = "", fg = "#854cc7" }, + { name = "vue", text = "", fg = "#8dc149" }, + { name = "wasm", text = "", fg = "#5c4cdb" }, + { name = "wav", text = "", fg = "#00afff" }, + { name = "webm", text = "", fg = "#fd971f" }, + { name = "webmanifest", text = "", fg = "#f1e05a" }, + { name = "webp", text = "", fg = "#a074c4" }, + { name = "webpack", text = "󰜫", fg = "#519aba" }, + { name = "wma", text = "", fg = "#00afff" }, + { name = "woff", text = "", fg = "#ececec" }, + { name = "woff2", text = "", fg = "#ececec" }, + { name = "wrl", text = "󰆧", fg = "#888888" }, + { name = "wrz", text = "󰆧", fg = "#888888" }, + { name = "wv", text = "", fg = "#00afff" }, + { name = "wvc", text = "", fg = "#00afff" }, + { name = "x", text = "", fg = "#599eff" }, + { name = "xaml", text = "󰙳", fg = "#512bd4" }, + { name = "xcf", text = "", fg = "#635b46" }, + { name = "xcplayground", text = "", fg = "#e37933" }, + { name = "xcstrings", text = "", fg = "#2596be" }, + { name = "xls", text = "󰈛", fg = "#207245" }, + { name = "xlsx", text = "󰈛", fg = "#207245" }, + { name = "xm", text = "", fg = "#519aba" }, + { name = "xml", text = "󰗀", fg = "#e37933" }, + { name = "xpi", text = "", fg = "#ff1b01" }, + { name = "xul", text = "", fg = "#e37933" }, + { name = "xz", text = "", fg = "#eca517" }, + { name = "yaml", text = "", fg = "#6d8086" }, + { name = "yml", text = "", fg = "#6d8086" }, + { name = "zig", text = "", fg = "#f69a1b" }, + { name = "zip", text = "", fg = "#eca517" }, + { name = "zsh", text = "", fg = "#89e051" }, + { name = "zst", text = "", fg = "#eca517" }, + { name = "🔥", text = "", fg = "#ff4c1f" }, +] +conds = [ + # Special files + { if = "orphan", text = "" }, + { if = "link", text = "" }, + { if = "block", text = "" }, + { if = "char", text = "" }, + { if = "fifo", text = "" }, + { if = "sock", text = "" }, + { if = "sticky", text = "" }, + { if = "dummy", text = "" }, + + # Fallback + { if = "dir", text = "󰉋" }, + { if = "exec", text = "" }, + { if = "!dir", text = "󰈔" }, +] + +# : }}} diff --git a/yazi-config/preset/theme+light.toml b/yazi-config/preset/theme+light.toml new file mode 100644 index 000000000..183864627 --- /dev/null +++ b/yazi-config/preset/theme+light.toml @@ -0,0 +1,649 @@ +# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. +# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. +"$schema" = "https://yazi-rs.github.io/schemas/theme.json" + +# vim:fileencoding=utf-8:foldmethod=marker + +# : Icons {{{ + +[icon] + +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 = "#666620" }, + { name = ".bash_profile", text = "", fg = "#447028" }, + { name = ".bashrc", text = "", fg = "#447028" }, + { name = ".dockerignore", text = "󰡨", fg = "#2e5f99" }, + { name = ".ds_store", text = "", fg = "#41535b" }, + { name = ".editorconfig", text = "", fg = "#333030" }, + { name = ".env", text = "", fg = "#32310d" }, + { name = ".eslintignore", text = "", fg = "#4b32c3" }, + { name = ".eslintrc", text = "", fg = "#4b32c3" }, + { name = ".git-blame-ignore-revs", text = "", fg = "#b83a1d" }, + { name = ".gitattributes", text = "", fg = "#b83a1d" }, + { name = ".gitconfig", text = "", fg = "#b83a1d" }, + { name = ".gitignore", text = "", fg = "#b83a1d" }, + { name = ".gitlab-ci.yml", text = "", fg = "#aa321f" }, + { name = ".gitmodules", text = "", fg = "#b83a1d" }, + { name = ".gtkrc-2.0", text = "", fg = "#333333" }, + { name = ".gvimrc", text = "", fg = "#017226" }, + { name = ".justfile", text = "", fg = "#526064" }, + { name = ".luaurc", text = "", fg = "#007abf" }, + { name = ".mailmap", text = "󰊢", fg = "#b83a1d" }, + { name = ".npmignore", text = "", fg = "#ae1d38" }, + { name = ".npmrc", text = "", fg = "#ae1d38" }, + { name = ".nuxtrc", text = "󱄆", fg = "#00835f" }, + { name = ".nvmrc", text = "", fg = "#3f6b34" }, + { name = ".prettierignore", text = "", fg = "#3264b7" }, + { name = ".prettierrc", text = "", fg = "#3264b7" }, + { name = ".prettierrc.cjs", text = "", fg = "#3264b7" }, + { name = ".prettierrc.js", text = "", fg = "#3264b7" }, + { name = ".prettierrc.json", text = "", fg = "#3264b7" }, + { name = ".prettierrc.json5", text = "", fg = "#3264b7" }, + { name = ".prettierrc.mjs", text = "", fg = "#3264b7" }, + { name = ".prettierrc.toml", text = "", fg = "#3264b7" }, + { name = ".prettierrc.yaml", text = "", fg = "#3264b7" }, + { name = ".prettierrc.yml", text = "", fg = "#3264b7" }, + { name = ".settings.json", text = "", fg = "#643995" }, + { name = ".SRCINFO", text = "󰣇", fg = "#0b6f9e" }, + { name = ".vimrc", text = "", fg = "#017226" }, + { name = ".Xauthority", text = "", fg = "#ac3a12" }, + { name = ".xinitrc", text = "", fg = "#ac3a12" }, + { name = ".Xresources", text = "", fg = "#ac3a12" }, + { name = ".xsession", text = "", fg = "#ac3a12" }, + { name = ".zprofile", text = "", fg = "#447028" }, + { name = ".zshenv", text = "", fg = "#447028" }, + { name = ".zshrc", text = "", fg = "#447028" }, + { name = "_gvimrc", text = "", fg = "#017226" }, + { name = "_vimrc", text = "", fg = "#017226" }, + { name = "avif", text = "", fg = "#6b4d83" }, + { name = "brewfile", text = "", fg = "#701516" }, + { name = "bspwmrc", text = "", fg = "#2f2f2f" }, + { name = "build", text = "", fg = "#447028" }, + { name = "build.gradle", text = "", fg = "#005f87" }, + { name = "build.zig.zon", text = "", fg = "#7b4d0e" }, + { name = "cantorrc", text = "", fg = "#1573b6" }, + { name = "checkhealth", text = "󰓙", fg = "#3a5a7e" }, + { name = "cmakelists.txt", text = "", fg = "#526064" }, + { name = "code_of_conduct", text = "", fg = "#ab104a" }, + { name = "code_of_conduct.md", text = "", fg = "#ab104a" }, + { name = "commit_editmsg", text = "", fg = "#b83a1d" }, + { name = "commitlint.config.js", text = "󰜘", fg = "#207067" }, + { name = "commitlint.config.ts", text = "󰜘", fg = "#207067" }, + { name = "compose.yaml", text = "󰡨", fg = "#2e5f99" }, + { name = "compose.yml", text = "󰡨", fg = "#2e5f99" }, + { name = "config", text = "", fg = "#526064" }, + { name = "containerfile", text = "󰡨", fg = "#2e5f99" }, + { name = "copying", text = "", fg = "#666620" }, + { name = "copying.lesser", text = "", fg = "#666620" }, + { name = "docker-compose.yaml", text = "󰡨", fg = "#2e5f99" }, + { name = "docker-compose.yml", text = "󰡨", fg = "#2e5f99" }, + { name = "dockerfile", text = "󰡨", fg = "#2e5f99" }, + { name = "eslint.config.cjs", text = "", fg = "#4b32c3" }, + { name = "eslint.config.js", text = "", fg = "#4b32c3" }, + { name = "eslint.config.mjs", text = "", fg = "#4b32c3" }, + { name = "eslint.config.ts", text = "", fg = "#4b32c3" }, + { name = "ext_typoscript_setup.txt", text = "", fg = "#aa5a00" }, + { name = "favicon.ico", text = "", fg = "#666620" }, + { name = "fp-info-cache", text = "", fg = "#333333" }, + { name = "fp-lib-table", text = "", fg = "#333333" }, + { name = "FreeCAD.conf", text = "", fg = "#98262c" }, + { name = "gemfile$", text = "", fg = "#701516" }, + { name = "gnumakefile", text = "", fg = "#526064" }, + { name = "go.mod", text = "", fg = "#36677c" }, + { name = "go.sum", text = "", fg = "#36677c" }, + { name = "go.work", text = "", fg = "#36677c" }, + { name = "gradle-wrapper.properties", text = "", fg = "#005f87" }, + { name = "gradle.properties", text = "", fg = "#005f87" }, + { name = "gradlew", text = "", fg = "#005f87" }, + { name = "groovy", text = "", fg = "#384e5d" }, + { name = "gruntfile.babel.js", text = "", fg = "#975122" }, + { name = "gruntfile.coffee", text = "", fg = "#975122" }, + { name = "gruntfile.js", text = "", fg = "#975122" }, + { name = "gruntfile.ts", text = "", fg = "#975122" }, + { name = "gtkrc", text = "", fg = "#333333" }, + { name = "gulpfile.babel.js", text = "", fg = "#992e33" }, + { name = "gulpfile.coffee", text = "", fg = "#992e33" }, + { name = "gulpfile.js", text = "", fg = "#992e33" }, + { name = "gulpfile.ts", text = "", fg = "#992e33" }, + { name = "hypridle.conf", text = "", fg = "#008082" }, + { name = "hyprland.conf", text = "", fg = "#008082" }, + { name = "hyprlock.conf", text = "", fg = "#008082" }, + { name = "hyprpaper.conf", text = "", fg = "#008082" }, + { name = "i18n.config.js", text = "󰗊", fg = "#515987" }, + { name = "i18n.config.ts", text = "󰗊", fg = "#515987" }, + { name = "i3blocks.conf", text = "", fg = "#2e2f30" }, + { name = "i3status.conf", text = "", fg = "#2e2f30" }, + { name = "ionic.config.json", text = "", fg = "#355fa5" }, + { name = "justfile", text = "", fg = "#526064" }, + { name = "kalgebrarc", text = "", fg = "#1573b6" }, + { name = "kdeglobals", text = "", fg = "#1573b6" }, + { name = "kdenlive-layoutsrc", text = "", fg = "#425c79" }, + { name = "kdenliverc", text = "", fg = "#425c79" }, + { name = "kritadisplayrc", text = "", fg = "#a12ea7" }, + { name = "kritarc", text = "", fg = "#a12ea7" }, + { name = "license", text = "", fg = "#686020" }, + { name = "license.md", text = "", fg = "#686020" }, + { name = "lxde-rc.xml", text = "", fg = "#606060" }, + { name = "lxqt.conf", text = "", fg = "#016e9e" }, + { name = "makefile", text = "", fg = "#526064" }, + { name = "mix.lock", text = "", fg = "#6b4d83" }, + { name = "mpv.conf", text = "", fg = "#3b1342" }, + { name = "node_modules", text = "", fg = "#ae1d38" }, + { name = "nuxt.config.cjs", text = "󱄆", fg = "#00835f" }, + { name = "nuxt.config.js", text = "󱄆", fg = "#00835f" }, + { name = "nuxt.config.mjs", text = "󱄆", fg = "#00835f" }, + { name = "nuxt.config.ts", text = "󱄆", fg = "#00835f" }, + { name = "package-lock.json", text = "", fg = "#7a0d21" }, + { name = "package.json", text = "", fg = "#ae1d38" }, + { name = "PKGBUILD", text = "", fg = "#0b6f9e" }, + { name = "platformio.ini", text = "", fg = "#a4571d" }, + { name = "pom.xml", text = "", fg = "#7a0d21" }, + { name = "prettier.config.cjs", text = "", fg = "#3264b7" }, + { name = "prettier.config.js", text = "", fg = "#3264b7" }, + { name = "prettier.config.mjs", text = "", fg = "#3264b7" }, + { name = "prettier.config.ts", text = "", fg = "#3264b7" }, + { name = "procfile", text = "", fg = "#6b4d83" }, + { name = "PrusaSlicer.ini", text = "", fg = "#9d4717" }, + { name = "PrusaSlicerGcodeViewer.ini", text = "", fg = "#9d4717" }, + { name = "py.typed", text = "", fg = "#805e02" }, + { name = "QtProject.conf", text = "", fg = "#2b8937" }, + { name = "rakefile", text = "", fg = "#701516" }, + { name = "rmd", text = "", fg = "#36677c" }, + { name = "robots.txt", text = "󰚩", fg = "#465470" }, + { name = "security", text = "󰒃", fg = "#3f4143" }, + { name = "security.md", text = "󰒃", fg = "#3f4143" }, + { name = "settings.gradle", text = "", fg = "#005f87" }, + { name = "svelte.config.js", text = "", fg = "#bf2e00" }, + { name = "sxhkdrc", text = "", fg = "#2f2f2f" }, + { name = "sym-lib-table", text = "", fg = "#333333" }, + { name = "tailwind.config.js", text = "󱏿", fg = "#158197" }, + { name = "tailwind.config.mjs", text = "󱏿", fg = "#158197" }, + { name = "tailwind.config.ts", text = "󱏿", fg = "#158197" }, + { name = "tmux.conf", text = "", fg = "#0f8c13" }, + { name = "tmux.conf.local", text = "", fg = "#0f8c13" }, + { name = "tsconfig.json", text = "", fg = "#36677c" }, + { name = "unlicense", text = "", fg = "#686020" }, + { name = "vagrantfile$", text = "", fg = "#104abf" }, + { name = "vercel.json", text = "▲", fg = "#333333" }, + { name = "vlcrc", text = "󰕼", fg = "#9f5100" }, + { name = "webpack", text = "󰜫", fg = "#36677c" }, + { name = "weston.ini", text = "", fg = "#805e00" }, + { name = "workspace", text = "", fg = "#447028" }, + { name = "xmobarrc", text = "", fg = "#a9333e" }, + { name = "xmobarrc.hs", text = "", fg = "#a9333e" }, + { name = "xmonad.hs", text = "", fg = "#a9333e" }, + { name = "xorg.conf", text = "", fg = "#ac3a12" }, + { name = "xsettingsd.conf", text = "", fg = "#ac3a12" }, +] +exts = [ + { name = "3gp", text = "", fg = "#7e4c10" }, + { name = "3mf", text = "󰆧", fg = "#5b5b5b" }, + { name = "7z", text = "", fg = "#76520c" }, + { name = "a", text = "", fg = "#494a47" }, + { name = "aac", text = "", fg = "#0075aa" }, + { name = "ai", text = "", fg = "#666620" }, + { name = "aif", text = "", fg = "#0075aa" }, + { name = "aiff", text = "", fg = "#0075aa" }, + { name = "android", text = "", fg = "#277e3e" }, + { name = "ape", text = "", fg = "#0075aa" }, + { name = "apk", text = "", fg = "#277e3e" }, + { name = "apl", text = "⍝", fg = "#805200" }, + { name = "app", text = "", fg = "#9f0500" }, + { name = "applescript", text = "", fg = "#526064" }, + { name = "asc", text = "󰦝", fg = "#41525f" }, + { name = "ass", text = "󰨖", fg = "#805c0a" }, + { name = "astro", text = "", fg = "#aa2f4d" }, + { name = "awk", text = "", fg = "#3a4446" }, + { name = "azcli", text = "", fg = "#005a9f" }, + { name = "bak", text = "󰁯", fg = "#526064" }, + { name = "bash", text = "", fg = "#447028" }, + { name = "bat", text = "", fg = "#40500f" }, + { name = "bazel", text = "", fg = "#447028" }, + { name = "bib", text = "󱉟", fg = "#666620" }, + { name = "bicep", text = "", fg = "#36677c" }, + { name = "bicepparam", text = "", fg = "#6a4d77" }, + { name = "bin", text = "", fg = "#9f0500" }, + { name = "blade.php", text = "", fg = "#a0372b" }, + { name = "blend", text = "󰂫", fg = "#9c4f00" }, + { name = "blp", text = "󰺾", fg = "#3a6497" }, + { name = "bmp", text = "", fg = "#6b4d83" }, + { name = "bqn", text = "⎉", fg = "#20544d" }, + { name = "brep", text = "󰻫", fg = "#576342" }, + { name = "bz", text = "", fg = "#76520c" }, + { name = "bz2", text = "", fg = "#76520c" }, + { name = "bz3", text = "", fg = "#76520c" }, + { name = "bzl", text = "", fg = "#447028" }, + { name = "c", text = "", fg = "#3b69aa" }, + { name = "c++", text = "", fg = "#a23253" }, + { name = "cache", text = "", fg = "#333333" }, + { name = "cast", text = "", fg = "#7e4c10" }, + { name = "cbl", text = "⚙", fg = "#005ca5" }, + { name = "cc", text = "", fg = "#a23253" }, + { name = "ccm", text = "", fg = "#a23253" }, + { name = "cfg", text = "", fg = "#526064" }, + { name = "cjs", text = "", fg = "#666620" }, + { name = "clj", text = "", fg = "#466024" }, + { name = "cljc", text = "", fg = "#466024" }, + { name = "cljd", text = "", fg = "#36677c" }, + { name = "cljs", text = "", fg = "#36677c" }, + { name = "cmake", text = "", fg = "#526064" }, + { name = "cob", text = "⚙", fg = "#005ca5" }, + { name = "cobol", text = "⚙", fg = "#005ca5" }, + { name = "coffee", text = "", fg = "#666620" }, + { name = "conf", text = "", fg = "#526064" }, + { name = "config.ru", text = "", fg = "#701516" }, + { name = "cow", text = "󰆚", fg = "#70421b" }, + { name = "cp", text = "", fg = "#36677c" }, + { name = "cpp", text = "", fg = "#36677c" }, + { name = "cppm", text = "", fg = "#36677c" }, + { name = "cpy", text = "⚙", fg = "#005ca5" }, + { name = "cr", text = "", fg = "#434343" }, + { name = "crdownload", text = "", fg = "#226654" }, + { name = "cs", text = "󰌛", fg = "#434d04" }, + { name = "csh", text = "", fg = "#3a4446" }, + { name = "cshtml", text = "󱦗", fg = "#512bd4" }, + { name = "cson", text = "", fg = "#666620" }, + { name = "csproj", text = "󰪮", fg = "#512bd4" }, + { name = "css", text = "", fg = "#2c6ea3" }, + { name = "csv", text = "", fg = "#447028" }, + { name = "cts", text = "", fg = "#36677c" }, + { name = "cu", text = "", fg = "#447028" }, + { name = "cue", text = "󰲹", fg = "#764a57" }, + { name = "cuh", text = "", fg = "#6b4d83" }, + { name = "cxx", text = "", fg = "#36677c" }, + { name = "cxxm", text = "", fg = "#36677c" }, + { name = "d", text = "", fg = "#325a13" }, + { name = "d.ts", text = "", fg = "#6a4c2a" }, + { name = "dart", text = "", fg = "#03589c" }, + { name = "db", text = "", fg = "#494848" }, + { name = "dconf", text = "", fg = "#333333" }, + { name = "desktop", text = "", fg = "#563d7c" }, + { name = "diff", text = "", fg = "#41535b" }, + { name = "dll", text = "", fg = "#4d2c0b" }, + { name = "doc", text = "󰈬", fg = "#185abd" }, + { name = "Dockerfile", text = "󰡨", fg = "#2e5f99" }, + { name = "docx", text = "󰈬", fg = "#185abd" }, + { name = "dot", text = "󱁉", fg = "#244a6a" }, + { name = "download", text = "", fg = "#226654" }, + { name = "drl", text = "", fg = "#553a3a" }, + { name = "dropbox", text = "", fg = "#0049be" }, + { name = "dump", text = "", fg = "#494848" }, + { name = "dwg", text = "󰻫", fg = "#576342" }, + { name = "dxf", text = "󰻫", fg = "#576342" }, + { name = "ebook", text = "", fg = "#755836" }, + { name = "ebuild", text = "", fg = "#4c416e" }, + { name = "edn", text = "", fg = "#36677c" }, + { name = "eex", text = "", fg = "#6b4d83" }, + { name = "ejs", text = "", fg = "#666620" }, + { name = "el", text = "", fg = "#61568e" }, + { name = "elc", text = "", fg = "#61568e" }, + { name = "elf", text = "", fg = "#9f0500" }, + { name = "elm", text = "", fg = "#36677c" }, + { name = "eln", text = "", fg = "#61568e" }, + { name = "env", text = "", fg = "#32310d" }, + { name = "eot", text = "", fg = "#2f2f2f" }, + { name = "epp", text = "", fg = "#80530d" }, + { name = "epub", text = "", fg = "#755836" }, + { name = "erb", text = "", fg = "#701516" }, + { name = "erl", text = "", fg = "#8a2b72" }, + { name = "ex", text = "", fg = "#6b4d83" }, + { name = "exe", text = "", fg = "#9f0500" }, + { name = "exs", text = "", fg = "#6b4d83" }, + { name = "f#", text = "", fg = "#36677c" }, + { name = "f3d", text = "󰻫", fg = "#576342" }, + { name = "f90", text = "󱈚", fg = "#563b70" }, + { name = "fbx", text = "󰆧", fg = "#5b5b5b" }, + { name = "fcbak", text = "", fg = "#98262c" }, + { name = "fcmacro", text = "", fg = "#98262c" }, + { name = "fcmat", text = "", fg = "#98262c" }, + { name = "fcparam", text = "", fg = "#98262c" }, + { name = "fcscript", text = "", fg = "#98262c" }, + { name = "fcstd", text = "", fg = "#98262c" }, + { name = "fcstd1", text = "", fg = "#98262c" }, + { name = "fctb", text = "", fg = "#98262c" }, + { name = "fctl", text = "", fg = "#98262c" }, + { name = "fdmdownload", text = "", fg = "#226654" }, + { name = "fish", text = "", fg = "#3a4446" }, + { name = "flac", text = "", fg = "#005880" }, + { name = "flc", text = "", fg = "#2f2f2f" }, + { name = "flf", text = "", fg = "#2f2f2f" }, + { name = "fnl", text = "", fg = "#33312b" }, + { name = "fs", text = "", fg = "#36677c" }, + { name = "fsi", text = "", fg = "#36677c" }, + { name = "fsscript", text = "", fg = "#36677c" }, + { name = "fsx", text = "", fg = "#36677c" }, + { name = "gcode", text = "󰐫", fg = "#0f5582" }, + { name = "gd", text = "", fg = "#526064" }, + { name = "gemspec", text = "", fg = "#701516" }, + { name = "gif", text = "", fg = "#6b4d83" }, + { name = "git", text = "", fg = "#b5391e" }, + { name = "glb", text = "", fg = "#80581e" }, + { name = "gleam", text = "", fg = "#553a51" }, + { name = "gnumakefile", text = "", fg = "#526064" }, + { name = "go", text = "", fg = "#36677c" }, + { name = "godot", text = "", fg = "#526064" }, + { name = "gql", text = "", fg = "#ac2880" }, + { name = "gradle", text = "", fg = "#005f87" }, + { name = "graphql", text = "", fg = "#ac2880" }, + { name = "gresource", text = "", fg = "#333333" }, + { name = "gv", text = "󱁉", fg = "#244a6a" }, + { name = "gz", text = "", fg = "#76520c" }, + { name = "h", text = "", fg = "#6b4d83" }, + { name = "haml", text = "", fg = "#2f2f2d" }, + { name = "hbs", text = "", fg = "#a04f1d" }, + { name = "heex", text = "", fg = "#6b4d83" }, + { name = "hex", text = "", fg = "#224abf" }, + { name = "hh", text = "", fg = "#6b4d83" }, + { name = "hpp", text = "", fg = "#6b4d83" }, + { name = "hrl", text = "", fg = "#8a2b72" }, + { name = "hs", text = "", fg = "#6b4d83" }, + { name = "htm", text = "", fg = "#aa391c" }, + { name = "html", text = "", fg = "#ab3a1c" }, + { name = "http", text = "", fg = "#006a95" }, + { name = "huff", text = "󰡘", fg = "#4242c7" }, + { name = "hurl", text = "", fg = "#bf0266" }, + { name = "hx", text = "", fg = "#9c5715" }, + { name = "hxx", text = "", fg = "#6b4d83" }, + { name = "ical", text = "", fg = "#2b2e83" }, + { name = "icalendar", text = "", fg = "#2b2e83" }, + { name = "ico", text = "", fg = "#666620" }, + { name = "ics", text = "", fg = "#2b2e83" }, + { name = "ifb", text = "", fg = "#2b2e83" }, + { name = "ifc", text = "󰻫", fg = "#576342" }, + { name = "ige", text = "󰻫", fg = "#576342" }, + { name = "iges", text = "󰻫", fg = "#576342" }, + { name = "igs", text = "󰻫", fg = "#576342" }, + { name = "image", text = "", fg = "#453f43" }, + { name = "img", text = "", fg = "#453f43" }, + { name = "import", text = "", fg = "#2f2f2f" }, + { name = "info", text = "", fg = "#333329" }, + { name = "ini", text = "", fg = "#526064" }, + { name = "ino", text = "", fg = "#397981" }, + { name = "ipynb", text = "", fg = "#366b8a" }, + { name = "iso", text = "", fg = "#453f43" }, + { name = "ixx", text = "", fg = "#36677c" }, + { name = "java", text = "", fg = "#992e33" }, + { name = "jl", text = "", fg = "#6c4b7c" }, + { name = "jpeg", text = "", fg = "#6b4d83" }, + { name = "jpg", text = "", fg = "#6b4d83" }, + { name = "js", text = "", fg = "#666620" }, + { name = "json", text = "", fg = "#666620" }, + { name = "json5", text = "", fg = "#666620" }, + { name = "jsonc", text = "", fg = "#666620" }, + { name = "jsx", text = "", fg = "#158197" }, + { name = "jwmrc", text = "", fg = "#005a9a" }, + { name = "jxl", text = "", fg = "#6b4d83" }, + { name = "kbx", text = "󰯄", fg = "#565856" }, + { name = "kdb", text = "", fg = "#3e7427" }, + { name = "kdbx", text = "", fg = "#3e7427" }, + { name = "kdenlive", text = "", fg = "#425c79" }, + { name = "kdenlivetitle", text = "", fg = "#425c79" }, + { name = "kicad_dru", text = "", fg = "#333333" }, + { name = "kicad_mod", text = "", fg = "#333333" }, + { name = "kicad_pcb", text = "", fg = "#333333" }, + { name = "kicad_prl", text = "", fg = "#333333" }, + { name = "kicad_pro", text = "", fg = "#333333" }, + { name = "kicad_sch", text = "", fg = "#333333" }, + { name = "kicad_sym", text = "", fg = "#333333" }, + { name = "kicad_wks", text = "", fg = "#333333" }, + { name = "ko", text = "", fg = "#494a47" }, + { name = "kpp", text = "", fg = "#a12ea7" }, + { name = "kra", text = "", fg = "#a12ea7" }, + { name = "krz", text = "", fg = "#a12ea7" }, + { name = "ksh", text = "", fg = "#3a4446" }, + { name = "kt", text = "", fg = "#5f3ebf" }, + { name = "kts", text = "", fg = "#5f3ebf" }, + { name = "lck", text = "", fg = "#5e5e5e" }, + { name = "leex", text = "", fg = "#6b4d83" }, + { name = "less", text = "", fg = "#563d7c" }, + { name = "lff", text = "", fg = "#2f2f2f" }, + { name = "lhs", text = "", fg = "#6b4d83" }, + { name = "lib", text = "", fg = "#4d2c0b" }, + { name = "license", text = "", fg = "#666620" }, + { name = "liquid", text = "", fg = "#4a6024" }, + { name = "lock", text = "", fg = "#5e5e5e" }, + { name = "log", text = "󰌱", fg = "#4a4a4a" }, + { name = "lrc", text = "󰨖", fg = "#805c0a" }, + { name = "lua", text = "", fg = "#366b8a" }, + { name = "luac", text = "", fg = "#366b8a" }, + { name = "luau", text = "", fg = "#007abf" }, + { name = "m", text = "", fg = "#3b69aa" }, + { name = "m3u", text = "󰲹", fg = "#764a57" }, + { name = "m3u8", text = "󰲹", fg = "#764a57" }, + { name = "m4a", text = "", fg = "#0075aa" }, + { name = "m4v", text = "", fg = "#7e4c10" }, + { name = "magnet", text = "", fg = "#a51b16" }, + { name = "makefile", text = "", fg = "#526064" }, + { name = "markdown", text = "", fg = "#4a4a4a" }, + { name = "material", text = "󰔉", fg = "#8a2b72" }, + { name = "md", text = "", fg = "#4a4a4a" }, + { name = "md5", text = "󰕥", fg = "#5d5975" }, + { name = "mdx", text = "", fg = "#36677c" }, + { name = "mint", text = "󰌪", fg = "#44604a" }, + { name = "mjs", text = "", fg = "#504b1e" }, + { name = "mk", text = "", fg = "#526064" }, + { name = "mkv", text = "", fg = "#7e4c10" }, + { name = "ml", text = "", fg = "#975122" }, + { name = "mli", text = "", fg = "#975122" }, + { name = "mm", text = "", fg = "#36677c" }, + { name = "mo", text = "∞", fg = "#654ca7" }, + { name = "mobi", text = "", fg = "#755836" }, + { name = "mojo", text = "", fg = "#bf3917" }, + { name = "mov", text = "", fg = "#7e4c10" }, + { name = "mp3", text = "", fg = "#0075aa" }, + { name = "mp4", text = "", fg = "#7e4c10" }, + { name = "mpp", text = "", fg = "#36677c" }, + { name = "msf", text = "", fg = "#0e5ca9" }, + { name = "mts", text = "", fg = "#36677c" }, + { name = "mustache", text = "", fg = "#975122" }, + { name = "nfo", text = "", fg = "#333329" }, + { name = "nim", text = "", fg = "#514700" }, + { name = "nix", text = "", fg = "#3f5d72" }, + { name = "nswag", text = "", fg = "#427516" }, + { name = "nu", text = ">", fg = "#276f4e" }, + { name = "o", text = "", fg = "#9f0500" }, + { name = "obj", text = "󰆧", fg = "#5b5b5b" }, + { name = "ogg", text = "", fg = "#005880" }, + { name = "opus", text = "", fg = "#005880" }, + { name = "org", text = "", fg = "#4f7166" }, + { name = "otf", text = "", fg = "#2f2f2f" }, + { name = "out", text = "", fg = "#9f0500" }, + { name = "part", text = "", fg = "#226654" }, + { name = "patch", text = "", fg = "#41535b" }, + { name = "pck", text = "", fg = "#526064" }, + { name = "pcm", text = "", fg = "#005880" }, + { name = "pdf", text = "", fg = "#b30b00" }, + { name = "php", text = "", fg = "#6b4d83" }, + { name = "pl", text = "", fg = "#36677c" }, + { name = "pls", text = "󰲹", fg = "#764a57" }, + { name = "ply", text = "󰆧", fg = "#5b5b5b" }, + { name = "pm", text = "", fg = "#36677c" }, + { name = "png", text = "", fg = "#6b4d83" }, + { name = "po", text = "", fg = "#1c708e" }, + { name = "pot", text = "", fg = "#1c708e" }, + { name = "pp", text = "", fg = "#80530d" }, + { name = "ppt", text = "󰈧", fg = "#983826" }, + { name = "prisma", text = "", fg = "#444da2" }, + { name = "pro", text = "", fg = "#725c2a" }, + { name = "ps1", text = "󰨊", fg = "#325698" }, + { name = "psb", text = "", fg = "#36677c" }, + { name = "psd", text = "", fg = "#36677c" }, + { name = "psd1", text = "󰨊", fg = "#4f5893" }, + { name = "psm1", text = "󰨊", fg = "#4f5893" }, + { name = "pub", text = "󰷖", fg = "#4c422f" }, + { name = "pxd", text = "", fg = "#3c6f98" }, + { name = "pxi", text = "", fg = "#3c6f98" }, + { name = "py", text = "", fg = "#805e02" }, + { name = "pyc", text = "", fg = "#332d1d" }, + { name = "pyd", text = "", fg = "#332d1d" }, + { name = "pyi", text = "", fg = "#805e02" }, + { name = "pyo", text = "", fg = "#332d1d" }, + { name = "pyw", text = "", fg = "#3c6f98" }, + { name = "pyx", text = "", fg = "#3c6f98" }, + { name = "qm", text = "", fg = "#1c708e" }, + { name = "qml", text = "", fg = "#2b8937" }, + { name = "qrc", text = "", fg = "#2b8937" }, + { name = "qss", text = "", fg = "#2b8937" }, + { name = "query", text = "", fg = "#607035" }, + { name = "R", text = "󰟔", fg = "#1a4c8c" }, + { name = "r", text = "󰟔", fg = "#1a4c8c" }, + { name = "rake", text = "", fg = "#701516" }, + { name = "rar", text = "", fg = "#76520c" }, + { name = "razor", text = "󱦘", fg = "#512bd4" }, + { name = "rb", text = "", fg = "#701516" }, + { name = "res", text = "", fg = "#992e33" }, + { name = "resi", text = "", fg = "#a33759" }, + { name = "rlib", text = "", fg = "#6f5242" }, + { name = "rmd", text = "", fg = "#36677c" }, + { name = "rproj", text = "󰗆", fg = "#286844" }, + { name = "rs", text = "", fg = "#6f5242" }, + { name = "rss", text = "", fg = "#7e4e1e" }, + { name = "sass", text = "", fg = "#a33759" }, + { name = "sbt", text = "", fg = "#992e33" }, + { name = "sc", text = "", fg = "#992e33" }, + { name = "scad", text = "", fg = "#53480f" }, + { name = "scala", text = "", fg = "#992e33" }, + { name = "scm", text = "󰘧", fg = "#303030" }, + { name = "scss", text = "", fg = "#a33759" }, + { name = "sh", text = "", fg = "#3a4446" }, + { name = "sha1", text = "󰕥", fg = "#5d5975" }, + { name = "sha224", text = "󰕥", fg = "#5d5975" }, + { name = "sha256", text = "󰕥", fg = "#5d5975" }, + { name = "sha384", text = "󰕥", fg = "#5d5975" }, + { name = "sha512", text = "󰕥", fg = "#5d5975" }, + { name = "sig", text = "λ", fg = "#975122" }, + { name = "signature", text = "λ", fg = "#975122" }, + { name = "skp", text = "󰻫", fg = "#576342" }, + { name = "sldasm", text = "󰻫", fg = "#576342" }, + { name = "sldprt", text = "󰻫", fg = "#576342" }, + { name = "slim", text = "", fg = "#aa391c" }, + { name = "sln", text = "", fg = "#643995" }, + { name = "slvs", text = "󰻫", fg = "#576342" }, + { name = "sml", text = "λ", fg = "#975122" }, + { name = "so", text = "", fg = "#494a47" }, + { name = "sol", text = "", fg = "#36677c" }, + { name = "spec.js", text = "", fg = "#666620" }, + { name = "spec.jsx", text = "", fg = "#158197" }, + { name = "spec.ts", text = "", fg = "#36677c" }, + { name = "spec.tsx", text = "", fg = "#1354bf" }, + { name = "sql", text = "", fg = "#494848" }, + { name = "sqlite", text = "", fg = "#494848" }, + { name = "sqlite3", text = "", fg = "#494848" }, + { name = "srt", text = "󰨖", fg = "#805c0a" }, + { name = "ssa", text = "󰨖", fg = "#805c0a" }, + { name = "ste", text = "󰻫", fg = "#576342" }, + { name = "step", text = "󰻫", fg = "#576342" }, + { name = "stl", text = "󰆧", fg = "#5b5b5b" }, + { name = "stp", text = "󰻫", fg = "#576342" }, + { name = "strings", text = "", fg = "#1c708e" }, + { name = "styl", text = "", fg = "#466024" }, + { name = "sub", text = "󰨖", fg = "#805c0a" }, + { name = "sublime", text = "", fg = "#975122" }, + { name = "suo", text = "", fg = "#643995" }, + { name = "sv", text = "󰍛", fg = "#017226" }, + { name = "svelte", text = "", fg = "#bf2e00" }, + { name = "svg", text = "󰜡", fg = "#80581e" }, + { name = "svh", text = "󰍛", fg = "#017226" }, + { name = "swift", text = "", fg = "#975122" }, + { name = "t", text = "", fg = "#36677c" }, + { name = "tbc", text = "󰛓", fg = "#1e5cb3" }, + { name = "tcl", text = "󰛓", fg = "#1e5cb3" }, + { name = "templ", text = "", fg = "#6e5e18" }, + { name = "terminal", text = "", fg = "#217929" }, + { name = "test.js", text = "", fg = "#666620" }, + { name = "test.jsx", text = "", fg = "#158197" }, + { name = "test.ts", text = "", fg = "#36677c" }, + { name = "test.tsx", text = "", fg = "#1354bf" }, + { name = "tex", text = "", fg = "#3d6117" }, + { name = "tf", text = "", fg = "#4732af" }, + { name = "tfvars", text = "", fg = "#4732af" }, + { name = "tgz", text = "", fg = "#76520c" }, + { name = "tmux", text = "", fg = "#0f8c13" }, + { name = "toml", text = "", fg = "#753219" }, + { name = "torrent", text = "", fg = "#226654" }, + { name = "tres", text = "", fg = "#526064" }, + { name = "ts", text = "", fg = "#36677c" }, + { name = "tscn", text = "", fg = "#526064" }, + { name = "tsconfig", text = "", fg = "#aa5a00" }, + { name = "tsx", text = "", fg = "#1354bf" }, + { name = "ttf", text = "", fg = "#2f2f2f" }, + { name = "twig", text = "", fg = "#466024" }, + { name = "txt", text = "󰈙", fg = "#447028" }, + { name = "txz", text = "", fg = "#76520c" }, + { name = "typoscript", text = "", fg = "#aa5a00" }, + { name = "ui", text = "", fg = "#015bf0" }, + { name = "v", text = "󰍛", fg = "#017226" }, + { name = "vala", text = "", fg = "#562b86" }, + { name = "vh", text = "󰍛", fg = "#017226" }, + { name = "vhd", text = "󰍛", fg = "#017226" }, + { name = "vhdl", text = "󰍛", fg = "#017226" }, + { name = "vim", text = "", fg = "#017226" }, + { name = "vsh", text = "", fg = "#3e5a7f" }, + { name = "vsix", text = "", fg = "#643995" }, + { name = "vue", text = "", fg = "#466024" }, + { name = "wasm", text = "", fg = "#4539a4" }, + { name = "wav", text = "", fg = "#0075aa" }, + { name = "webm", text = "", fg = "#7e4c10" }, + { name = "webmanifest", text = "", fg = "#504b1e" }, + { name = "webp", text = "", fg = "#6b4d83" }, + { name = "webpack", text = "󰜫", fg = "#36677c" }, + { name = "wma", text = "", fg = "#0075aa" }, + { name = "woff", text = "", fg = "#2f2f2f" }, + { name = "woff2", text = "", fg = "#2f2f2f" }, + { name = "wrl", text = "󰆧", fg = "#5b5b5b" }, + { name = "wrz", text = "󰆧", fg = "#5b5b5b" }, + { name = "wv", text = "", fg = "#0075aa" }, + { name = "wvc", text = "", fg = "#0075aa" }, + { name = "x", text = "", fg = "#3b69aa" }, + { name = "xaml", text = "󰙳", fg = "#512bd4" }, + { name = "xcf", text = "", fg = "#4a4434" }, + { name = "xcplayground", text = "", fg = "#975122" }, + { name = "xcstrings", text = "", fg = "#1c708e" }, + { name = "xls", text = "󰈛", fg = "#207245" }, + { name = "xlsx", text = "󰈛", fg = "#207245" }, + { name = "xm", text = "", fg = "#36677c" }, + { name = "xml", text = "󰗀", fg = "#975122" }, + { name = "xpi", text = "", fg = "#bf1401" }, + { name = "xul", text = "", fg = "#975122" }, + { name = "xz", text = "", fg = "#76520c" }, + { name = "yaml", text = "", fg = "#526064" }, + { name = "yml", text = "", fg = "#526064" }, + { name = "zig", text = "", fg = "#7b4d0e" }, + { name = "zip", text = "", fg = "#76520c" }, + { name = "zsh", text = "", fg = "#447028" }, + { name = "zst", text = "", fg = "#76520c" }, + { name = "🔥", text = "", fg = "#bf3917" }, +] +conds = [ + # Special files + { if = "orphan", text = "" }, + { if = "link", text = "" }, + { if = "block", text = "" }, + { if = "char", text = "" }, + { if = "fifo", text = "" }, + { if = "sock", text = "" }, + { if = "sticky", text = "" }, + { if = "dummy", text = "" }, + + # Fallback + { if = "dir", text = "󰉋" }, + { if = "exec", text = "" }, + { if = "!dir", text = "󰈔" }, +] + +# : }}} diff --git a/yazi-config/preset/theme.toml b/yazi-config/preset/theme.toml index d98bdad0e..c1160d13e 100644 --- a/yazi-config/preset/theme.toml +++ b/yazi-config/preset/theme.toml @@ -7,7 +7,8 @@ # : Flavor {{{ [flavor] -use = "" +dark = "" +light = "" # : }}} @@ -212,589 +213,4 @@ rules = [ { name = "*/", fg = "blue" } ] -[icon] - -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 - { if = "orphan", text = "" }, - { if = "link" , text = "" }, - { if = "block" , text = "" }, - { if = "char" , text = "" }, - { if = "fifo" , text = "" }, - { if = "sock" , text = "" }, - { if = "sticky", text = "" }, - { if = "dummy", text = "" }, - - # Fallback - { if = "dir", text = "󰉋" }, - { if = "exec", text = "" }, - { if = "!dir", text = "󰈔" }, -] - # : }}} diff --git a/yazi-config/src/lib.rs b/yazi-config/src/lib.rs index b244c63f1..5cbf3b530 100644 --- a/yazi-config/src/lib.rs +++ b/yazi-config/src/lib.rs @@ -24,22 +24,7 @@ pub static LAYOUT: SyncCell = SyncCell::new(Layout::default()); pub fn init() -> anyhow::Result<()> { if let Err(e) = try_init(true) { - eprintln!("{e}"); - if let Some(src) = e.source() { - eprintln!("\nCaused by:\n{src}"); - } - - use crossterm::style::{Attribute, Print, SetAttributes}; - crossterm::execute!( - std::io::stderr(), - SetAttributes(Attribute::Reverse.into()), - SetAttributes(Attribute::Bold.into()), - Print("Press to continue with preset settings..."), - SetAttributes(Attribute::Reset.into()), - Print("\n"), - )?; - - std::io::stdin().read_line(&mut String::new())?; + wait_for_key(e)?; try_init(false)?; } @@ -78,13 +63,29 @@ Please change `create_title = "Create:"` to `create_title = ["Create:", "Create Ok(()) } +pub fn init_flavor(light: bool) -> anyhow::Result<()> { + let mut flavor_toml = Preset::flavor(light, true); + if let Err(e) = flavor_toml { + wait_for_key(e)?; + flavor_toml = Preset::flavor(light, false); + } + + let mut theme: theme::Theme = <_>::from_str(&flavor_toml.unwrap())?; + theme.manager.syntect_theme = theme + .flavor + .syntect_path(light) + .unwrap_or_else(|| yazi_shared::fs::expand_path(&theme.manager.syntect_theme)); + + THEME.init(theme); + Ok(()) +} + fn try_init(merge: bool) -> anyhow::Result<()> { - let (yazi_toml, keymap_toml, theme_toml) = if merge { + let (yazi_toml, keymap_toml) = if merge { let p = Xdg::config_dir(); - (Preset::yazi(&p)?, Preset::keymap(&p)?, Preset::theme(&p)?) + (Preset::yazi(&p)?, Preset::keymap(&p)?) } else { - use yazi_macro::config_preset as preset; - (preset!("yazi"), preset!("keymap"), preset!("theme")) + (yazi_macro::config_preset!("yazi"), yazi_macro::config_preset!("keymap")) }; let keymap = <_>::from_str(&keymap_toml)?; @@ -93,7 +94,6 @@ fn try_init(merge: bool) -> anyhow::Result<()> { let plugin = <_>::from_str(&yazi_toml)?; let preview = <_>::from_str(&yazi_toml)?; let tasks = <_>::from_str(&yazi_toml)?; - let theme = <_>::from_str(&theme_toml)?; let input = <_>::from_str(&yazi_toml)?; let confirm = <_>::from_str(&yazi_toml)?; let pick = <_>::from_str(&yazi_toml)?; @@ -105,7 +105,6 @@ fn try_init(merge: bool) -> anyhow::Result<()> { PLUGIN.init(plugin); PREVIEW.init(preview); TASKS.init(tasks); - THEME.init(theme); INPUT.init(input); CONFIRM.init(confirm); PICK.init(pick); @@ -113,3 +112,23 @@ fn try_init(merge: bool) -> anyhow::Result<()> { Ok(()) } + +fn wait_for_key(e: anyhow::Error) -> anyhow::Result<()> { + eprintln!("{e}"); + if let Some(src) = e.source() { + eprintln!("\nCaused by:\n{src}"); + } + + use crossterm::style::{Attribute, Print, SetAttributes}; + crossterm::execute!( + std::io::stderr(), + SetAttributes(Attribute::Reverse.into()), + SetAttributes(Attribute::Bold.into()), + Print("Press to continue with preset settings..."), + SetAttributes(Attribute::Reset.into()), + Print("\n"), + )?; + + std::io::stdin().read_line(&mut String::new())?; + Ok(()) +} diff --git a/yazi-config/src/preset.rs b/yazi-config/src/preset.rs index e3bb0c5c8..3ea85edda 100644 --- a/yazi-config/src/preset.rs +++ b/yazi-config/src/preset.rs @@ -1,8 +1,8 @@ -use std::{borrow::Cow, path::{Path, PathBuf}}; +use std::{borrow::Cow, path::{Path, PathBuf}, str::FromStr}; use anyhow::{Context, Result}; use toml::{Table, Value}; -use yazi_macro::config_preset as preset; +use yazi_shared::Xdg; use crate::theme::Flavor; @@ -10,26 +10,26 @@ pub(crate) struct Preset; impl Preset { pub(crate) fn yazi(p: &Path) -> Result> { - Self::merge_path(p.join("yazi.toml"), preset!("yazi")) + Self::merge_path(p.join("yazi.toml"), yazi_macro::config_preset!("yazi")) } pub(crate) fn keymap(p: &Path) -> Result> { - Self::merge_path(p.join("keymap.toml"), preset!("keymap")) + Self::merge_path(p.join("keymap.toml"), yazi_macro::config_preset!("keymap")) } - pub(crate) fn theme(p: &Path) -> Result> { - let Ok(user) = std::fs::read_to_string(p.join("theme.toml")) else { - return Ok(preset!("theme")); - }; - let Some(use_) = Flavor::parse_use(&user) else { - return Self::merge_str(&user, &preset!("theme")); + pub(crate) fn flavor(light: bool, merge: bool) -> Result> { + let theme = if merge { + std::fs::read_to_string(Xdg::config_dir().join("theme.toml")).unwrap_or_default() + } else { + Default::default() }; - let p = p.join(format!("flavors/{use_}.yazi/flavor.toml")); - let flavor = - std::fs::read_to_string(&p).with_context(|| format!("failed to load flavor {p:?}"))?; + let flavor = Flavor::from_str(&theme)?; + + let preset = + if light { yazi_macro::theme_preset!("light") } else { yazi_macro::theme_preset!("dark") }; - Self::merge_str(&user, &Self::merge_str(&flavor, &preset!("theme"))?) + Self::merge_str(&theme, &Self::merge_str(&flavor.read(light)?, &preset)?) } #[inline] diff --git a/yazi-config/src/theme/flavor.rs b/yazi-config/src/theme/flavor.rs index 7827c2039..e621a3932 100644 --- a/yazi-config/src/theme/flavor.rs +++ b/yazi-config/src/theme/flavor.rs @@ -1,23 +1,50 @@ +use std::{borrow::Cow, path::PathBuf, str::FromStr}; + +use anyhow::{Context, Result}; use serde::{Deserialize, Serialize}; +use yazi_shared::Xdg; -#[derive(Deserialize, Serialize)] +#[derive(Default, Deserialize, Serialize)] pub struct Flavor { - #[serde(rename = "use")] - pub use_: String, + #[serde(default)] + pub dark: String, + #[serde(default)] + pub light: String, } -impl Flavor { - pub fn parse_use(s: &str) -> Option { +impl FromStr for Flavor { + type Err = anyhow::Error; + + fn from_str(s: &str) -> Result { #[derive(Deserialize)] struct Outer { - flavor: Inner, - } - #[derive(Deserialize)] - struct Inner { - #[serde(rename = "use")] - pub use_: String, + #[serde(default)] + flavor: Flavor, } - toml::from_str::(s).ok().map(|o| o.flavor.use_).filter(|s| !s.is_empty()) + Ok( + toml::from_str::(s) + .context("Failed to parse the [flavor] section in your theme.toml")? + .flavor, + ) + } +} + +impl Flavor { + pub(crate) fn read(&self, light: bool) -> Result> { + Ok(match if light { self.light.as_str() } else { self.dark.as_str() } { + "" => Cow::Borrowed(""), + name => { + let p = Xdg::config_dir().join(format!("flavors/{name}.yazi/flavor.toml")); + std::fs::read_to_string(&p).with_context(|| format!("Failed to load flavor {p:?}"))?.into() + } + }) + } + + pub(crate) fn syntect_path(&self, light: bool) -> Option { + match if light { self.light.as_str() } else { self.dark.as_str() } { + "" => None, + name => Some(Xdg::config_dir().join(format!("flavors/{name}.yazi/tmtheme.xml"))), + } } } diff --git a/yazi-config/src/theme/icons.rs b/yazi-config/src/theme/icons.rs index edf803fbc..d5262c15f 100644 --- a/yazi-config/src/theme/icons.rs +++ b/yazi-config/src/theme/icons.rs @@ -106,42 +106,32 @@ impl<'de> Deserialize<'de> for Icons { } #[derive(Deserialize)] pub struct ShadowPat { - name: Pattern, - text: String, - fg_dark: Option, - #[allow(dead_code)] - fg_light: Option, + name: Pattern, + text: String, + fg: Option, } #[derive(Deserialize)] pub struct ShadowStr { - name: String, - text: String, - fg_dark: Option, - #[allow(dead_code)] - fg_light: Option, + name: String, + text: String, + fg: Option, } #[derive(Deserialize)] pub struct ShadowCond { #[serde(rename = "if")] - if_: Condition, - text: String, - fg_dark: Option, - #[allow(dead_code)] - fg_light: Option, + if_: Condition, + text: String, + fg: Option, } let shadow = Shadow::deserialize(deserializer)?; let globs = Preset::mix(shadow.prepend_globs, shadow.globs, shadow.append_globs) - .map(|v| { - (v.name, Icon { text: v.text, style: Style { fg: v.fg_dark, ..Default::default() } }) - }) + .map(|v| (v.name, Icon { text: v.text, style: Style { fg: v.fg, ..Default::default() } })) .collect(); let conds = Preset::mix(shadow.prepend_conds, shadow.conds, shadow.append_conds) - .map(|v| { - (v.if_, Icon { text: v.text, style: Style { fg: v.fg_dark, ..Default::default() } }) - }) + .map(|v| (v.if_, Icon { text: v.text, style: Style { fg: v.fg, ..Default::default() } })) .collect(); fn as_map(it: impl Iterator) -> HashMap { @@ -149,7 +139,7 @@ impl<'de> Deserialize<'de> for Icons { for v in it { map .entry(v.name) - .or_insert(Icon { text: v.text, style: Style { fg: v.fg_dark, ..Default::default() } }); + .or_insert(Icon { text: v.text, style: Style { fg: v.fg, ..Default::default() } }); } map.shrink_to_fit(); map diff --git a/yazi-config/src/theme/theme.rs b/yazi-config/src/theme/theme.rs index 7712b102a..6220dd6a3 100644 --- a/yazi-config/src/theme/theme.rs +++ b/yazi-config/src/theme/theme.rs @@ -3,7 +3,7 @@ use std::{path::PathBuf, str::FromStr}; use anyhow::Context; use serde::{Deserialize, Serialize}; use validator::Validate; -use yazi_shared::{Xdg, fs::expand_path, theme::Style}; +use yazi_shared::theme::Style; use super::{Filetype, Flavor, Icons}; @@ -32,17 +32,10 @@ impl FromStr for Theme { type Err = anyhow::Error; fn from_str(s: &str) -> Result { - let mut theme: Self = toml::from_str(s).context("Failed to parse your yazi.toml")?; + let theme: Self = toml::from_str(s).context("Failed to parse your theme.toml")?; theme.manager.validate()?; theme.which.validate()?; - if theme.flavor.use_.is_empty() { - theme.manager.syntect_theme = expand_path(&theme.manager.syntect_theme); - } else { - theme.manager.syntect_theme = - Xdg::config_dir().join(format!("flavors/{}.yazi/tmtheme.xml", theme.flavor.use_)); - } - Ok(theme) } } diff --git a/yazi-config/src/which/which.rs b/yazi-config/src/which/which.rs index 8a488d3f3..d47f73e16 100644 --- a/yazi-config/src/which/which.rs +++ b/yazi-config/src/which/which.rs @@ -24,8 +24,8 @@ impl FromStr for Which { which: Which, } - let outer = toml::from_str::(s) - .context("Failed to parse the [which] section in your yazi.toml")?; + let outer: Outer = + toml::from_str(s).context("Failed to parse the [which] section in your yazi.toml")?; Ok(outer.which) } diff --git a/yazi-fm/src/main.rs b/yazi-fm/src/main.rs index ef71aceee..8379d72d7 100644 --- a/yazi-fm/src/main.rs +++ b/yazi-fm/src/main.rs @@ -20,7 +20,7 @@ async fn main() -> anyhow::Result<()> { yazi_config::init()?; - yazi_adapter::init(); + yazi_adapter::init()?; yazi_boot::init(); diff --git a/yazi-fm/src/term.rs b/yazi-fm/src/term.rs index b8143a819..510eb3a80 100644 --- a/yazi-fm/src/term.rs +++ b/yazi-fm/src/term.rs @@ -28,10 +28,11 @@ impl Term { enable_raw_mode()?; execute!( BufWriter::new(stderr()), - Print(Mux::csi("\x1b[?12$p")), // Request cursor blink status (DECSET) - Print(Mux::csi("\x1bP$q q\x1b\\")), // Request cursor shape (DECRQM) - Print(Mux::csi("\x1b[?u\x1b[0c")), // Request keyboard enhancement flags (CSI u) EnterAlternateScreen, + Print(Mux::csi("\x1bP$q q\x1b\\")), // Request cursor shape (DECRQM) + Print(Mux::csi("\x1b[?12$p")), // Request cursor blink status (DECSET) + Print("\x1b[?u"), // Request keyboard enhancement flags (CSI u) + Print(Mux::csi("\x1b[0c")), // Request device attributes EnableBracketedPaste, mouse::SetMouse(true), )?; diff --git a/yazi-macro/src/asset.rs b/yazi-macro/src/asset.rs index fc33384f5..a46ccfa16 100644 --- a/yazi-macro/src/asset.rs +++ b/yazi-macro/src/asset.rs @@ -3,14 +3,14 @@ macro_rules! config_preset { ($name:literal) => {{ #[cfg(debug_assertions)] { - std::borrow::Cow::Owned( + std::borrow::Cow::from( std::fs::read_to_string(concat!(env!("CARGO_MANIFEST_DIR"), "/preset/", $name, ".toml")) .expect(concat!("Failed to read 'yazi-config/preset/", $name, ".toml'")), ) } #[cfg(not(debug_assertions))] { - std::borrow::Cow::Borrowed(include_str!(concat!( + std::borrow::Cow::from(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), "/preset/", $name, @@ -37,3 +37,28 @@ macro_rules! plugin_preset { } }}; } + +#[macro_export] +macro_rules! theme_preset { + ($name:literal) => {{ + #[cfg(debug_assertions)] + { + let append = std::fs::read_to_string(concat!( + env!("CARGO_MANIFEST_DIR"), + "/preset/theme+", + $name, + ".toml" + )) + .expect(concat!("Failed to read 'yazi-config/preset/theme+", $name, ".toml'")); + std::borrow::Cow::from(format!("{}\n{append}", &$crate::config_preset!("theme"))) + } + #[cfg(not(debug_assertions))] + { + std::borrow::Cow::from(concat!( + include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/preset/theme.toml")), + "\n", + include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/preset/theme+", $name, ".toml")) + )) + } + }}; +} diff --git a/yazi-plugin/src/loader/loader.rs b/yazi-plugin/src/loader/loader.rs index 64a9360cb..f30cc0fcc 100644 --- a/yazi-plugin/src/loader/loader.rs +++ b/yazi-plugin/src/loader/loader.rs @@ -57,7 +57,7 @@ impl Loader { let p = BOOT.plugin_dir.join(format!("{name}.yazi/init.lua")); let chunk = - fs::read(&p).await.with_context(|| format!("failed to load plugin from {p:?}"))?.into(); + fs::read(&p).await.with_context(|| format!("Failed to load plugin from {p:?}"))?.into(); self.cache.write().insert(name.to_owned(), chunk); Ok(()) diff --git a/yazi-shared/src/either.rs b/yazi-shared/src/either.rs new file mode 100644 index 000000000..1a6a3e586 --- /dev/null +++ b/yazi-shared/src/either.rs @@ -0,0 +1,49 @@ +#[derive(Clone, Copy, Debug)] +pub enum Either { + Left(L), + Right(R), +} + +impl Either { + pub fn left(&self) -> Option<&L> { + match self { + Either::Left(l) => Some(l), + _ => None, + } + } + + pub fn right(&self) -> Option<&R> { + match self { + Either::Right(r) => Some(r), + _ => None, + } + } + + pub fn left_mut(&mut self) -> Option<&mut L> { + match self { + Either::Left(l) => Some(l), + _ => None, + } + } + + pub fn right_mut(&mut self) -> Option<&mut R> { + match self { + Either::Right(r) => Some(r), + _ => None, + } + } + + pub fn into_left(self) -> Option { + match self { + Either::Left(l) => Some(l), + _ => None, + } + } + + pub fn into_right(self) -> Option { + match self { + Either::Right(r) => Some(r), + _ => None, + } + } +} diff --git a/yazi-shared/src/lib.rs b/yazi-shared/src/lib.rs index 1dd01b9dd..24bb6f8d5 100644 --- a/yazi-shared/src/lib.rs +++ b/yazi-shared/src/lib.rs @@ -2,7 +2,7 @@ yazi_macro::mod_pub!(errors event fs shell theme translit); -yazi_macro::mod_flat!(chars condition debounce env id layer natsort number os rand ro_cell sync_cell terminal throttle time xdg); +yazi_macro::mod_flat!(chars condition debounce either env id layer natsort number os rand ro_cell sync_cell terminal throttle time xdg); pub fn init() { #[cfg(unix)]